java.lang.Object
com.google.web.bindery.requestfactory.shared.Receiver<V>
Type Parameters:
V - value type
Direct Known Subclasses:
FanoutReceiver

public abstract class Receiver<V> extends Object
  • Constructor Details

    • Receiver

      public Receiver()
  • Method Details

    • onFailure

      public void onFailure(ServerFailure error)
      Receives general failure notifications. The default implementation looks at ServerFailure.isFatal(), and throws a runtime exception with the failure object's error message if it is true.
      Parameters:
      error - a ServerFailure instance
    • onSuccess

      public abstract void onSuccess(V response)
      Called when a Request has been successfully executed on the server.
      Parameters:
      response - a response of type V
    • onViolation

      @Deprecated public void onViolation(Set<Violation> errors)
      Deprecated.
      Called if an object sent to the server could not be validated. The default implementation calls onFailure(ServerFailure) if errors is not empty.
      Parameters:
      errors - a Set of Violation instances
    • onConstraintViolation

      public void onConstraintViolation(Set<ConstraintViolation<?>> violations)
      Called if an object sent to the server could not be validated. The default implementation calls onViolation(Set), converting the ConstraintViolation objects to the deprecated Violation type.
      Parameters:
      violations - a Set of ConstraintViolation instances