Class Receiver<V>
java.lang.Object
com.google.web.bindery.requestfactory.shared.Receiver<V>
- Type Parameters:
V- value type
- Direct Known Subclasses:
FanoutReceiver
Callback object for
Request.fire(Receiver) and
RequestContext.fire(Receiver).-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidonConstraintViolation(Set<ConstraintViolation<?>> violations) Called if an object sent to the server could not be validated.voidonFailure(ServerFailure error) Receives general failure notifications.abstract voidCalled when a Request has been successfully executed on the server.voidonViolation(Set<Violation> errors) Deprecated.
-
Constructor Details
-
Receiver
public Receiver()
-
-
Method Details
-
onSuccess
Called when a Request has been successfully executed on the server.- Parameters:
response- a response of type V
-
onViolation
Deprecated.UseonConstraintViolation(Set)insteadCalled if an object sent to the server could not be validated. The default implementation callsonFailure(ServerFailure)iferrorsis not empty.- Parameters:
errors- a Set ofViolationinstances
-
onConstraintViolation
Called if an object sent to the server could not be validated. The default implementation callsonViolation(Set), converting theConstraintViolationobjects to the deprecatedViolationtype.- Parameters:
violations- a Set ofConstraintViolationinstances
onConstraintViolation(Set)instead