Class AbstractModelControllerClient

java.lang.Object
org.jboss.as.controller.client.impl.AbstractModelControllerClient
All Implemented Interfaces:
Closeable, AutoCloseable, ModelControllerClient, org.jboss.as.protocol.mgmt.ManagementRequestHandlerFactory
Direct Known Subclasses:
ExistingChannelModelControllerClient, RemotingModelControllerClient

public abstract class AbstractModelControllerClient extends Object implements ModelControllerClient, org.jboss.as.protocol.mgmt.ManagementRequestHandlerFactory
Author:
Kabir Khan
  • Constructor Details

    • AbstractModelControllerClient

      public AbstractModelControllerClient()
  • Method Details

    • getChannelAssociation

      protected abstract org.jboss.as.protocol.mgmt.ManagementChannelAssociation getChannelAssociation() throws IOException
      Get the mgmt channel association.
      Returns:
      the channel association
      Throws:
      IOException
    • execute

      public ModelNode execute(ModelNode operation) throws IOException
      Description copied from interface: ModelControllerClient
      Execute an operation synchronously.
      Specified by:
      execute in interface ModelControllerClient
      Parameters:
      operation - the operation to execute
      Returns:
      the result of the operation
      Throws:
      IOException - if an I/O error occurs while executing the operation
    • execute

      public ModelNode execute(Operation operation) throws IOException
      Description copied from interface: ModelControllerClient
      Execute an operation synchronously. Note that associated input-streams have to be closed by the caller, after the operation completed OperationAttachments.isAutoCloseStreams().
      Specified by:
      execute in interface ModelControllerClient
      Parameters:
      operation - the operation to execute
      Returns:
      the result of the operation
      Throws:
      IOException - if an I/O error occurs while executing the operation
    • execute

      public ModelNode execute(ModelNode operation, OperationMessageHandler messageHandler) throws IOException
      Description copied from interface: ModelControllerClient
      Execute an operation synchronously, optionally receiving progress reports.
      Specified by:
      execute in interface ModelControllerClient
      Parameters:
      operation - the operation to execute
      messageHandler - the message handler to use for operation progress reporting, or null for none
      Returns:
      the result of the operation
      Throws:
      IOException - if an I/O error occurs while executing the operation
    • execute

      public ModelNode execute(Operation operation, OperationMessageHandler messageHandler) throws IOException
      Description copied from interface: ModelControllerClient
      Execute an operation synchronously, optionally receiving progress reports.

      Note that associated input-streams have to be closed by the caller, after the operation completed OperationAttachments.isAutoCloseStreams().

      Specified by:
      execute in interface ModelControllerClient
      Parameters:
      operation - the operation to execute
      messageHandler - the message handler to use for operation progress reporting, or null for none
      Returns:
      the result of the operation
      Throws:
      IOException - if an I/O error occurs while executing the operation
    • executeOperation

      public OperationResponse executeOperation(Operation operation, OperationMessageHandler messageHandler) throws IOException
      Description copied from interface: ModelControllerClient
      Execute an operation synchronously, optionally receiving progress reports, with the response to the operation making available any input streams that the server may associate with the response.

      Note that associated input-streams have to be closed by the caller, after the operation completed OperationAttachments.isAutoCloseStreams().

      Specified by:
      executeOperation in interface ModelControllerClient
      Parameters:
      operation - the operation to execute
      messageHandler - the message handler to use for operation progress reporting, or null for none
      Returns:
      the result of the operation
      Throws:
      IOException - if an I/O error occurs while executing the operation
    • executeAsync

      public org.jboss.threads.AsyncFuture<ModelNode> executeAsync(ModelNode operation, OperationMessageHandler messageHandler)
      Description copied from interface: ModelControllerClient
      Execute an operation in another thread, optionally receiving progress reports.
      Specified by:
      executeAsync in interface ModelControllerClient
      Parameters:
      operation - the operation to execute
      messageHandler - the message handler to use for operation progress reporting, or null for none
      Returns:
      the future result of the operation
    • executeAsync

      public org.jboss.threads.AsyncFuture<ModelNode> executeAsync(Operation operation, OperationMessageHandler messageHandler)
      Description copied from interface: ModelControllerClient
      Execute an operation in another thread, optionally receiving progress reports.

      Note that associated input-streams have to be closed by the caller, after the operation completed OperationAttachments.isAutoCloseStreams().

      Specified by:
      executeAsync in interface ModelControllerClient
      Parameters:
      operation - the operation to execute
      messageHandler - the message handler to use for operation progress reporting, or null for none
      Returns:
      the future result of the operation
    • executeOperationAsync

      public org.jboss.threads.AsyncFuture<OperationResponse> executeOperationAsync(Operation operation, OperationMessageHandler messageHandler)
      Description copied from interface: ModelControllerClient
      Execute an operation in another thread, optionally receiving progress reports, with the response to the operation making available any input streams that the server may associate with the response.

      Note that associated input-streams have to be closed by the caller, after the operation completed OperationAttachments.isAutoCloseStreams().

      Specified by:
      executeOperationAsync in interface ModelControllerClient
      Parameters:
      operation - the operation to execute
      messageHandler - the message handler to use for operation progress reporting, or null for none
      Returns:
      the future result of the operation
    • resolveHandler

      public org.jboss.as.protocol.mgmt.ManagementRequestHandler<?,?> resolveHandler(org.jboss.as.protocol.mgmt.ManagementRequestHandlerFactory.RequestHandlerChain handlers, org.jboss.as.protocol.mgmt.ManagementRequestHeader header)
      Specified by:
      resolveHandler in interface org.jboss.as.protocol.mgmt.ManagementRequestHandlerFactory
    • executeRequest

      protected org.jboss.threads.AsyncFuture<OperationResponse> executeRequest(org.jboss.as.protocol.mgmt.ManagementRequest<OperationResponse,org.jboss.as.controller.client.impl.AbstractModelControllerClient.OperationExecutionContext> request, org.jboss.as.controller.client.impl.AbstractModelControllerClient.OperationExecutionContext attachment) throws IOException
      Throws:
      IOException