Annotation Interface Timeout


@Documented @Target(TYPE) @Retention(RUNTIME) @Inherited public @interface Timeout
Annotation to be placed on requests (i.e. queries and commands). Configures the time before such request will time out when sent using request/response methods such as send and sendAndWait.

If no timeout is configured here, blocking sendAndWait calls use their standard one-minute timeout while non-blocking send calls use the gateway's default request handling behavior.

  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    int
    Configures the maximum number of time units before a request with this annotation will time out.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Returns the time unit for value().
  • Element Details

    • value

      int value
      Configures the maximum number of time units before a request with this annotation will time out.
    • timeUnit

      TimeUnit timeUnit
      Returns the time unit for value(). Defaults to TimeUnit.MILLISECONDS.
      Default:
      MILLISECONDS