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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidRegister a receiver to be called by the fanout.protected voidfinish()Called after all Receivers have been executed.voidonConstraintViolation(Set<ConstraintViolation<?>> violations) Called if an object sent to the server could not be validated.voidonFailure(ServerFailure error) Receives general failure notifications.voidCalled when a Request has been successfully executed on the server.protected voidSubclasses may override this method to alter how the FanoutReceiver collects exceptions that escape from the queued Receivers.voidonViolation(Set<Violation> errors) Deprecated.
-
Constructor Details
-
FanoutReceiver
public FanoutReceiver()
-
-
Method Details
-
onConstraintViolation
Description copied from class:ReceiverCalled if an object sent to the server could not be validated. The default implementation callsReceiver.onViolation(Set), converting theConstraintViolationobjects to the deprecatedViolationtype.- Overrides:
onConstraintViolationin classReceiver<T>- Parameters:
violations- a Set ofConstraintViolationinstances
-
onSuccess
Description copied from class:ReceiverCalled when a Request has been successfully executed on the server. -
onViolation
Deprecated.Description copied from class:ReceiverCalled if an object sent to the server could not be validated. The default implementation callsReceiver.onFailure(ServerFailure)iferrorsis not empty.- Overrides:
onViolationin classReceiver<T>- Parameters:
errors- a Set ofViolationinstances
-
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.