org.whispersystems.signalservice.api.push.exceptions.EncapsulatedExceptions Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of signal-service-java Show documentation
Show all versions of signal-service-java Show documentation
Signal Service communication library for Java
/**
* Copyright (C) 2014-2016 Open Whisper Systems
*
* Licensed according to the LICENSE file in this repository.
*/
package org.whispersystems.signalservice.api.push.exceptions;
import org.whispersystems.signalservice.api.crypto.UntrustedIdentityException;
import java.util.LinkedList;
import java.util.List;
public class EncapsulatedExceptions extends Throwable {
private final List untrustedIdentityExceptions;
private final List unregisteredUserExceptions;
private final List networkExceptions;
public EncapsulatedExceptions(List untrustedIdentities,
List unregisteredUsers,
List networkExceptions)
{
this.untrustedIdentityExceptions = untrustedIdentities;
this.unregisteredUserExceptions = unregisteredUsers;
this.networkExceptions = networkExceptions;
}
public EncapsulatedExceptions(UntrustedIdentityException e) {
this.untrustedIdentityExceptions = new LinkedList<>();
this.unregisteredUserExceptions = new LinkedList<>();
this.networkExceptions = new LinkedList<>();
this.untrustedIdentityExceptions.add(e);
}
public List getUntrustedIdentityExceptions() {
return untrustedIdentityExceptions;
}
public List getUnregisteredUserExceptions() {
return unregisteredUserExceptions;
}
public List getNetworkExceptions() {
return networkExceptions;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy