Class FanoutReceiver<T>
java.lang.Object
com.google.web.bindery.requestfactory.shared.Receiver<T>
com.google.web.bindery.requestfactory.shared.FanoutReceiver<T>
- Type Parameters:
T
- the type of data being received
A FanoutReceiver will forward its callbacks to zero or more other Receivers.
Any exceptions thrown by the queued Receivers will be re-thrown as an
UmbrellaException
after all Receivers have been invoked.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Register a receiver to be called by the fanout.protected void
finish()
Called after all Receivers have been executed.void
onConstraintViolation
(Set<ConstraintViolation<?>> violations) Called if an object sent to the server could not be validated.void
onFailure
(ServerFailure error) Receives general failure notifications.void
Called when a Request has been successfully executed on the server.protected void
Subclasses may override this method to alter how the FanoutReceiver collects exceptions that escape from the queued Receivers.void
onViolation
(Set<Violation> errors) Deprecated.
-
Constructor Details
-
FanoutReceiver
public FanoutReceiver()
-
-
Method Details
-
onConstraintViolation
Description copied from class:Receiver
Called if an object sent to the server could not be validated. The default implementation callsReceiver.onViolation(Set)
, converting theConstraintViolation
objects to the deprecatedViolation
type.- Overrides:
onConstraintViolation
in classReceiver<T>
- Parameters:
violations
- a Set ofConstraintViolation
instances
-
onSuccess
Description copied from class:Receiver
Called when a Request has been successfully executed on the server. -
onViolation
Deprecated.Description copied from class:Receiver
Called if an object sent to the server could not be validated. The default implementation callsReceiver.onFailure(ServerFailure)
iferrors
is not empty.- Overrides:
onViolation
in classReceiver<T>
- Parameters:
errors
- a Set ofViolation
instances
-
finish
protected void finish()Called after all Receivers have been executed. -
onUncaughtThrowable
Subclasses may override this method to alter how the FanoutReceiver collects exceptions that escape from the queued Receivers.