Interface ActiveOperation<T,​A>

  • Type Parameters:
    T - the result type
    A - the attachment type

    public interface ActiveOperation<T,​A>
    Encapsulates information about a currently active operation, which can require multiple messages exchanged between the client and the server. An attachment is optional, but can be used to maintain a shared state between multiple requests. It can be accessed using the ManagementRequestContext.getAttachment() from the request handler. An operation is seen as active until one of the methods on the ActiveOperation.ResultHandler are called.
    Author:
    Emanuel Muckenhuber
    • Method Detail

      • getOperationId

        Integer getOperationId()
        Get the batch id.
        Returns:
        the batch id
      • getAttachment

        A getAttachment()
        Get the attachment.
        Returns:
        the attachment
      • getResult

        org.jboss.threads.AsyncFuture<T> getResult()
        Get the result.
        Returns:
        the future result
      • addCancellable

        void addCancellable​(org.xnio.Cancellable cancellable)
        Add a cancellation handler.
        Parameters:
        cancellable - the cancel handler