Interface Request<T>

Type Parameters:
T - The return type of objects in the corresponding response.
All Known Implementing Classes:
FakeRequest

public interface Request<T>
A Request represents a single method invocation on the server. It encapsulates the arguments provided to the Request factory method declared in a RequestContext as well as a set of object paths to return from the server. The returned data is provided to an optional Receiver object, specified by the to(Receiver) method.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Submit this request.
    void
    fire(Receiver<? super T> receiver)
    Convenience method equivalent to calling to(...).fire().
    Returns the RequestContext associated with the Request.
    to(Receiver<? super T> receiver)
    Specify the object that will receive the result of the method invocation.
    with(String... propertyRefs)
    Request additional reference properties to fetch with the return value.
  • Method Details

    • fire

      void fire()
      Submit this request. Failures will be reported through the global uncaught exception handler, if any.
    • fire

      void fire(Receiver<? super T> receiver)
      Convenience method equivalent to calling to(...).fire().
      Parameters:
      receiver - a Receiver instance
    • getRequestContext

      RequestContext getRequestContext()
      Returns the RequestContext associated with the Request.
    • to

      RequestContext to(Receiver<? super T> receiver)
      Specify the object that will receive the result of the method invocation.
      Parameters:
      receiver - a Receiver instance
      Returns:
      a RequestContext instance
    • with

      Request<T> with(String... propertyRefs)
      Request additional reference properties to fetch with the return value.
      Parameters:
      propertyRefs - a list of reference property names as Strings
      Returns:
      a Request instance of type T