|
GWT 2.7.0 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.google.web.bindery.requestfactory.shared.Receiver<T>
com.google.web.bindery.requestfactory.shared.FanoutReceiver<T>
T - the type of data being receivedpublic class FanoutReceiver<T>
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 | |
|---|---|
FanoutReceiver()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FanoutReceiver()
| Method Detail |
|---|
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
onSuccess in class Receiver<T>response - a response of type V@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)
|
GWT 2.7.0 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||