Package com.tick42.glue.core.interop.invoke

# 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).

- ## Nested Class Summary

  Nested Classes
  Modifier and Type | Interface | Description
  --- | --- | ---
  `static class` | `MethodInvocationResult.Type` |

  ## Nested classes/interfaces inherited from interface com.tick42.glue.core.interop.invoke.MethodInvocationResponse

  `MethodInvocationResponse.Status`

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `MethodInvocationResult.Type` | `getType()` | Return the type of the result.
  `default boolean` | `hasMultipleResponses()` | Whether this result contains multiple responses.
  `Iterator<MethodInvocationResponse<T>>` | `iterator()` | Return `iterator` over all received responses.

  ### Methods inherited from interface java.lang.Iterable

  `forEach, spliterator`

  ### Methods inherited from interface com.tick42.glue.core.interop.invoke.MethodInvocationResponse

  `getMethod, getReturned, getStatus`

- ## Method Details

  - ### getType

    MethodInvocationResult.Type 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

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