Class DelegatingModelControllerClient
- java.lang.Object
-
- org.jboss.as.controller.client.helpers.DelegatingModelControllerClient
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,ModelControllerClient
public class DelegatingModelControllerClient extends Object implements ModelControllerClient
Utility class to support delegation ofModelControllerClient
calls.- Author:
- Brian Stansberry (c) 2015 Red Hat Inc.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
DelegatingModelControllerClient.DelegateProvider
Provides a delegate for use by theDelegatingModelControllerClient
-
Nested classes/interfaces inherited from interface org.jboss.as.controller.client.ModelControllerClient
ModelControllerClient.Factory
-
-
Constructor Summary
Constructors Constructor Description DelegatingModelControllerClient(DelegatingModelControllerClient.DelegateProvider provider)
DelegatingModelControllerClient(ModelControllerClient delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
ModelNode
execute(Operation operation)
Execute an operation synchronously.ModelNode
execute(Operation operation, OperationMessageHandler messageHandler)
Execute an operation synchronously, optionally receiving progress reports.ModelNode
execute(ModelNode operation)
Execute an operation synchronously.ModelNode
execute(ModelNode operation, OperationMessageHandler messageHandler)
Execute an operation synchronously, optionally receiving progress reports.org.jboss.threads.AsyncFuture<ModelNode>
executeAsync(Operation operation, OperationMessageHandler messageHandler)
Execute an operation in another thread, optionally receiving progress reports.org.jboss.threads.AsyncFuture<ModelNode>
executeAsync(ModelNode operation, OperationMessageHandler messageHandler)
Execute an operation in another thread, optionally receiving progress reports.OperationResponse
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, wait
-
Methods inherited from interface org.jboss.as.controller.client.ModelControllerClient
executeAsync, executeAsync
-
-
-
-
Constructor Detail
-
DelegatingModelControllerClient
public DelegatingModelControllerClient(ModelControllerClient delegate)
-
DelegatingModelControllerClient
public DelegatingModelControllerClient(DelegatingModelControllerClient.DelegateProvider provider)
-
-
Method Detail
-
execute
public ModelNode execute(ModelNode operation) throws IOException
Description copied from interface:ModelControllerClient
Execute an operation synchronously.- Specified by:
execute
in 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 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 completedOperationAttachments.isAutoCloseStreams()
.- Specified by:
execute
in 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 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 interfaceModelControllerClient
- Parameters:
operation
- the operation to executemessageHandler
- the message handler to use for operation progress reporting, ornull
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 interfaceModelControllerClient
- Parameters:
operation
- the operation to executemessageHandler
- the message handler to use for operation progress reporting, ornull
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 interfaceModelControllerClient
- Parameters:
operation
- the operation to executemessageHandler
- the message handler to use for operation progress reporting, ornull
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 interfaceModelControllerClient
- Parameters:
operation
- the operation to executemessageHandler
- the message handler to use for operation progress reporting, ornull
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 interfaceModelControllerClient
- Parameters:
operation
- the operation to executemessageHandler
- the message handler to use for operation progress reporting, ornull
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 interfaceModelControllerClient
- Parameters:
operation
- the operation to executemessageHandler
- the message handler to use for operation progress reporting, ornull
for none- Returns:
- the future result of the operation
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
-