Interface MethodInvocationResult<T>

Type Parameters:
T - type of the returned response(s)
All Superinterfaces:
Iterable<MethodInvocationResponse<T>>, MethodInvocationResponse<T>

public interface MethodInvocationResult<T> extends MethodInvocationResponse<T>, Iterable<MethodInvocationResponse<T>>
Holds responses received for a method invocation.

Depending on the invocation options and currently available servers this result may contain a single response, multiple responses or no response (e.g. fire 'n forget).

  • Method Details

    • getType

      Return the type of the result.
      Returns:
      type of the result as a MethodInvocationResult.Type enum value, never null
    • hasMultipleResponses

      default boolean hasMultipleResponses()
      Whether this result contains multiple responses.
      Returns:
      true if this result contains multiple responses and false otherwise.
    • iterator

      Return iterator over all received responses.
      Specified by:
      iterator in interface Iterable<T>
      Returns:
      response iterator, never null