T - the type of data being receivedpublic class FanoutReceiver<T> extends Receiver<T>
UmbrellaException after all Receivers have been invoked.| Constructor and Description |
|---|
FanoutReceiver() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Receiver<? super T> receiver)
Register a receiver to be called by the fanout.
|
protected void |
finish()
Called after all Receivers have been executed.
|
void |
onConstraintViolation(java.util.Set<ConstraintViolation<?>> violations)
Called if an object sent to the server could not be validated.
|
void |
onFailure(ServerFailure error)
Receives general failure notifications.
|
void |
onSuccess(T response)
Called when a Request has been successfully executed on the server.
|
protected void |
onUncaughtThrowable(java.lang.Throwable t)
Subclasses may override this method to alter how the FanoutReceiver
collects exceptions that escape from the queued Receivers.
|
void |
onViolation(java.util.Set<Violation> errors)
Deprecated.
|
public void add(Receiver<? super T> receiver)
java.lang.IllegalArgumentException - if receiver is nullpublic void onConstraintViolation(java.util.Set<ConstraintViolation<?>> violations)
ReceiverReceiver.onViolation(Set), converting the
ConstraintViolation objects to the deprecated Violation
type.onConstraintViolation in class Receiver<T>violations - a Set of ConstraintViolation instancespublic void onFailure(ServerFailure error)
ReceiverServerFailure.isFatal(), and throws a runtime exception with the
failure object's error message if it is true.onFailure in class Receiver<T>error - a ServerFailure instancepublic void onSuccess(T response)
Receiver@Deprecated public void onViolation(java.util.Set<Violation> errors)
ReceiverReceiver.onFailure(ServerFailure) if errors
is not empty.onViolation in class Receiver<T>errors - a Set of Violation instancesprotected void finish()
protected void onUncaughtThrowable(java.lang.Throwable t)