Class ContextualModelControllerClient
java.lang.Object
org.jboss.as.controller.client.helpers.ContextualModelControllerClient
- All Implemented Interfaces:
Closeable,AutoCloseable,ModelControllerClient
- Author:
- James R. Perkins
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jboss.as.controller.client.ModelControllerClient
ModelControllerClient.Factory -
Constructor Summary
ConstructorsConstructorDescriptionContextualModelControllerClient(ModelControllerClient delegate, Contextual<?> context) Creates a client which uses the supplied context. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()org.jboss.threads.AsyncFuture<ModelNode>executeAsync(Operation operation, OperationMessageHandler messageHandler) Execute an operation in another thread, optionally receiving progress reports.executeOperation(Operation operation, OperationMessageHandler messageHandler) 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.org.jboss.threads.AsyncFuture<OperationResponse>executeOperationAsync(Operation operation, OperationMessageHandler messageHandler) 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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jboss.as.controller.client.ModelControllerClient
execute, execute, execute, execute, executeAsync, executeAsync, executeAsync
-
Constructor Details
-
ContextualModelControllerClient
Creates a client which uses the supplied context.- Parameters:
delegate- the delegate clientcontext- the context used to execute operations
-
-
Method Details
-
executeOperation
public OperationResponse executeOperation(Operation operation, OperationMessageHandler messageHandler) throws IOException Description copied from interface:ModelControllerClientExecute 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:
executeOperationin interfaceModelControllerClient- Parameters:
operation- the operation to executemessageHandler- the message handler to use for operation progress reporting, ornullfor 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(Operation operation, OperationMessageHandler messageHandler) Description copied from interface:ModelControllerClientExecute 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:
executeAsyncin interfaceModelControllerClient- Parameters:
operation- the operation to executemessageHandler- the message handler to use for operation progress reporting, ornullfor none- Returns:
- the future result of the operation
-
executeOperationAsync
public org.jboss.threads.AsyncFuture<OperationResponse> executeOperationAsync(Operation operation, OperationMessageHandler messageHandler) Description copied from interface:ModelControllerClientExecute 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:
executeOperationAsyncin interfaceModelControllerClient- Parameters:
operation- the operation to executemessageHandler- the message handler to use for operation progress reporting, ornullfor none- Returns:
- the future result of the operation
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-