Interface AsyncOperation

All Known Implementing Classes:
AggregateAsyncOperation, JeroMQAsyncOperation

public interface AsyncOperation
' A special return type which can be returnd by methods annotated with RemotelyInvokable which also meet the requirements for having the Dispatch.Type.ASYNCHRONOUS. When a method is backed by, RemoteInvoker.invokeAsyncV(Invocation, List, InvocationErrorConsumer) the result will be returned to the calling code which can control the underlying remote invocation. This controls the underlying connection state and allows the calling code to set timeouts or cancel the pending invocation.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final AsyncOperation
    Used as a default return value when implementing methods that return an instance of AsyncOperation.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Cancels the invocation.
    void
    timeout(long time, TimeUnit timeUnit)
    Sets the operation to automatically cancel after the supplied time has elapsed.
  • Field Details

    • DEFAULT

      static final AsyncOperation DEFAULT
      Used as a default return value when implementing methods that return an instance of AsyncOperation.
  • Method Details

    • cancel

      void cancel()
      Cancels the invocation.
    • timeout

      void timeout(long time, TimeUnit timeUnit)
      Sets the operation to automatically cancel after the supplied time has elapsed.
      Parameters:
      time - the time to wait
      timeUnit - the time unit to wait