Class ContextualModelControllerClient

    • Constructor Detail

      • ContextualModelControllerClient

        public ContextualModelControllerClient​(ModelControllerClient delegate,
                                               org.wildfly.common.context.Contextual<?> context)
        Creates a client which uses the supplied context.
        Parameters:
        delegate - the delegate client
        context - the context used to execute operations
    • Method Detail

      • 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<org.jboss.dmr.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