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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
onConstraintViolation
(Set<ConstraintViolation<?>> violations) Called if an object sent to the server could not be validated.void
onFailure
(ServerFailure error) Receives general failure notifications.abstract void
Called when a Request has been successfully executed on the server.void
onViolation
(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)
iferrors
is not empty.- Parameters:
errors
- a Set ofViolation
instances
-
onConstraintViolation
Called if an object sent to the server could not be validated. The default implementation callsonViolation(Set)
, converting theConstraintViolation
objects to the deprecatedViolation
type.- Parameters:
violations
- a Set ofConstraintViolation
instances
onConstraintViolation(Set)
instead