Interface ManagementRequestHandlerFactory.RequestHandlerChain

Enclosing interface:
ManagementRequestHandlerFactory

public static interface ManagementRequestHandlerFactory.RequestHandlerChain
A chain of multiple request handler factories, also providing a hook for factories to create new active operations or register the local process instance of a remotely initiated active operation.
  • Method Details

    • createActiveOperation

      <T, A> ActiveOperation<T,A> createActiveOperation(A attachment)
      Create a new active operation. This will generate a new operation-id.
      Type Parameters:
      T - the result type
      A - the attachment type
      Parameters:
      attachment - the optional attachment
      Returns:
      the registered active operation
    • createActiveOperation

      <T, A> ActiveOperation<T,A> createActiveOperation(A attachment, ActiveOperation.CompletedCallback<T> callback)
      Create a new active operation. This will generate a new operation-id.
      Type Parameters:
      T - the result type
      A - the attachment type
      Parameters:
      attachment - the optional attachment
      callback - the completed callback
      Returns:
      the registered active operation
    • registerActiveOperation

      <T, A> ActiveOperation<T,A> registerActiveOperation(Integer id, A attachment)
      Create a new active operation, with a given operation-id obtained from an incoming request's header.
      Type Parameters:
      T - the result type
      A - the attachment type
      Parameters:
      id - the operation-id
      attachment - the attachment
      Returns:
      the registered active operation
      Throws:
      IllegalStateException - if an operation with the same id is already registered
    • registerActiveOperation

      <T, A> ActiveOperation<T,A> registerActiveOperation(Integer id, A attachment, ActiveOperation.CompletedCallback<T> callback)
      Create a new active operation, with a given operation-idobtained from an incoming request's header.
      Type Parameters:
      T - the result type
      A - the attachment type
      Parameters:
      id - the operation-id
      attachment - the attachment
      callback - the completed callback
      Returns:
      the registered active operation
      Throws:
      IllegalStateException - if an operation with the same id is already registered
    • resolveNext

      ManagementRequestHandler<?,?> resolveNext()
      Ask the next factory in the chain to resolve the handler.
      Returns:
      the resolved management request handler