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
FieldsModifier and TypeFieldDescriptionstatic final AsyncOperation
Used as a default return value when implementing methods that return an instance ofAsyncOperation
. -
Method Summary
-
Field Details
-
DEFAULT
Used as a default return value when implementing methods that return an instance ofAsyncOperation
.
-
-
Method Details
-
cancel
void cancel()Cancels the invocation. -
timeout
Sets the operation to automatically cancel after the supplied time has elapsed.- Parameters:
time
- the time to waittimeUnit
- the time unit to wait
-