Class AbstractModelControllerClient
- java.lang.Object
-
- org.jboss.as.controller.client.impl.AbstractModelControllerClient
-
- All Implemented Interfaces:
Closeable,AutoCloseable,ModelControllerClient,ManagementRequestHandlerFactory
- Direct Known Subclasses:
ExistingChannelModelControllerClient,RemotingModelControllerClient
public abstract class AbstractModelControllerClient extends Object implements ModelControllerClient, ManagementRequestHandlerFactory
- Author:
- Kabir Khan
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jboss.as.protocol.mgmt.ManagementRequestHandlerFactory
ManagementRequestHandlerFactory.RequestHandlerChain
-
Nested classes/interfaces inherited from interface org.jboss.as.controller.client.ModelControllerClient
ModelControllerClient.Factory
-
-
Constructor Summary
Constructors Constructor Description AbstractModelControllerClient()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description org.jboss.dmr.ModelNodeexecute(Operation operation)Execute an operation synchronously.org.jboss.dmr.ModelNodeexecute(Operation operation, OperationMessageHandler messageHandler)Execute an operation synchronously, optionally receiving progress reports.org.jboss.dmr.ModelNodeexecute(org.jboss.dmr.ModelNode operation)Execute an operation synchronously.org.jboss.dmr.ModelNodeexecute(org.jboss.dmr.ModelNode operation, OperationMessageHandler messageHandler)Execute an operation synchronously, optionally receiving progress reports.org.jboss.threads.AsyncFuture<org.jboss.dmr.ModelNode>executeAsync(Operation operation, OperationMessageHandler messageHandler)Execute an operation in another thread, optionally receiving progress reports.org.jboss.threads.AsyncFuture<org.jboss.dmr.ModelNode>executeAsync(org.jboss.dmr.ModelNode operation, OperationMessageHandler messageHandler)Execute an operation in another thread, optionally receiving progress reports.OperationResponseexecuteOperation(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.protected org.jboss.threads.AsyncFuture<OperationResponse>executeRequest(ManagementRequest<OperationResponse,org.jboss.as.controller.client.impl.AbstractModelControllerClient.OperationExecutionContext> request, org.jboss.as.controller.client.impl.AbstractModelControllerClient.OperationExecutionContext attachment)protected abstract ManagementChannelAssociationgetChannelAssociation()Get the mgmt channel association.ManagementRequestHandler<?,?>resolveHandler(ManagementRequestHandlerFactory.RequestHandlerChain handlers, ManagementRequestHeader header)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jboss.as.controller.client.ModelControllerClient
executeAsync, executeAsync
-
-
-
-
Method Detail
-
getChannelAssociation
protected abstract ManagementChannelAssociation getChannelAssociation() throws IOException
Get the mgmt channel association.- Returns:
- the channel association
- Throws:
IOException
-
execute
public org.jboss.dmr.ModelNode execute(org.jboss.dmr.ModelNode operation) throws IOExceptionDescription copied from interface:ModelControllerClientExecute an operation synchronously.- Specified by:
executein interfaceModelControllerClient- 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 org.jboss.dmr.ModelNode execute(Operation operation) throws IOException
Description copied from interface:ModelControllerClientExecute an operation synchronously. Note that associated input-streams have to be closed by the caller, after the operation completedOperationAttachments.isAutoCloseStreams().- Specified by:
executein interfaceModelControllerClient- 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 org.jboss.dmr.ModelNode execute(org.jboss.dmr.ModelNode operation, OperationMessageHandler messageHandler) throws IOExceptionDescription copied from interface:ModelControllerClientExecute an operation synchronously, optionally receiving progress reports.- Specified by:
executein 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
-
execute
public org.jboss.dmr.ModelNode execute(Operation operation, OperationMessageHandler messageHandler) throws IOException
Description copied from interface:ModelControllerClientExecute 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:
executein 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
-
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<org.jboss.dmr.ModelNode> executeAsync(org.jboss.dmr.ModelNode operation, OperationMessageHandler messageHandler)Description copied from interface:ModelControllerClientExecute an operation in another thread, optionally receiving progress reports.- 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
-
executeAsync
public org.jboss.threads.AsyncFuture<org.jboss.dmr.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
-
resolveHandler
public ManagementRequestHandler<?,?> resolveHandler(ManagementRequestHandlerFactory.RequestHandlerChain handlers, ManagementRequestHeader header)
- Specified by:
resolveHandlerin interfaceManagementRequestHandlerFactory
-
executeRequest
protected org.jboss.threads.AsyncFuture<OperationResponse> executeRequest(ManagementRequest<OperationResponse,org.jboss.as.controller.client.impl.AbstractModelControllerClient.OperationExecutionContext> request, org.jboss.as.controller.client.impl.AbstractModelControllerClient.OperationExecutionContext attachment) throws IOException
- Throws:
IOException
-
-