public class DomainClientImpl extends Object implements DomainClient
DomainClient.Factory| Constructor and Description |
|---|
DomainClientImpl(InetAddress address,
int port) |
DomainClientImpl(InetAddress address,
int port,
CallbackHandler handler) |
DomainClientImpl(ModelControllerClient delegate) |
DomainClientImpl(String protocol,
InetAddress address,
int port) |
DomainClientImpl(String protocol,
InetAddress address,
int port,
CallbackHandler handler) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
addDeploymentContent(InputStream stream)
Add the content for a deployment to the domain controller.
|
void |
close() |
ModelNode |
execute(ModelNode operation)
Execute an operation synchronously.
|
ModelNode |
execute(ModelNode operation,
OperationMessageHandler messageHandler)
Execute an operation synchronously, optionally receiving progress reports.
|
ModelNode |
execute(Operation operation)
Execute an operation synchronously.
|
ModelNode |
execute(Operation operation,
OperationMessageHandler messageHandler)
Execute an operation synchronously, optionally receiving progress reports.
|
org.jboss.threads.AsyncFuture<ModelNode> |
executeAsync(ModelNode operation,
OperationMessageHandler messageHandler)
Execute an operation in another thread, optionally receiving progress reports.
|
org.jboss.threads.AsyncFuture<ModelNode> |
executeAsync(Operation 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.
|
DomainDeploymentManager |
getDeploymentManager()
Gets a
DomainDeploymentManager that provides a convenience API
for manipulating domain deployments. |
List<String> |
getHostControllerNames()
Gets the list of currently running host controllers.
|
Map<ServerIdentity,ServerStatus> |
getServerStatuses()
Gets a list of all servers known to the domain, along with their current
status. |
ServerStatus |
restartServer(String hostControllerName,
String serverName,
long gracefulShutdownTimeout,
TimeUnit timeUnit)
Restarts the given server.
|
ServerStatus |
startServer(String hostControllerName,
String serverName)
Starts the given server.
|
ServerStatus |
stopServer(String hostControllerName,
String serverName,
long gracefulShutdownTimeout,
TimeUnit timeUnit)
Stops the given server.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexecuteAsync, executeAsyncpublic DomainClientImpl(InetAddress address, int port)
public DomainClientImpl(InetAddress address, int port, CallbackHandler handler)
public DomainClientImpl(String protocol, InetAddress address, int port)
public DomainClientImpl(String protocol, InetAddress address, int port, CallbackHandler handler)
public DomainClientImpl(ModelControllerClient delegate)
public ModelNode execute(ModelNode operation) throws IOException
ModelControllerClientexecute in interface ModelControllerClientoperation - the operation to executeIOException - if an I/O error occurs while executing the operationpublic ModelNode execute(Operation operation) throws IOException
ModelControllerClientOperationAttachments.isAutoCloseStreams().execute in interface ModelControllerClientoperation - the operation to executeIOException - if an I/O error occurs while executing the operationpublic ModelNode execute(ModelNode operation, OperationMessageHandler messageHandler) throws IOException
ModelControllerClientexecute in interface ModelControllerClientoperation - the operation to executemessageHandler - the message handler to use for operation progress reporting, or null for noneIOException - if an I/O error occurs while executing the operationpublic ModelNode execute(Operation operation, OperationMessageHandler messageHandler) throws IOException
ModelControllerClient
Note that associated input-streams have to be closed by the caller, after the
operation completed OperationAttachments.isAutoCloseStreams().
execute in interface ModelControllerClientoperation - the operation to executemessageHandler - the message handler to use for operation progress reporting, or null for noneIOException - if an I/O error occurs while executing the operationpublic org.jboss.threads.AsyncFuture<ModelNode> executeAsync(ModelNode operation, OperationMessageHandler messageHandler)
ModelControllerClientexecuteAsync in interface ModelControllerClientoperation - the operation to executemessageHandler - the message handler to use for operation progress reporting, or null for nonepublic org.jboss.threads.AsyncFuture<ModelNode> executeAsync(Operation operation, OperationMessageHandler messageHandler)
ModelControllerClient
Note that associated input-streams have to be closed by the caller, after the
operation completed OperationAttachments.isAutoCloseStreams().
executeAsync in interface ModelControllerClientoperation - the operation to executemessageHandler - the message handler to use for operation progress reporting, or null for nonepublic OperationResponse executeOperation(Operation operation, OperationMessageHandler messageHandler) throws IOException
ModelControllerClient
Note that associated input-streams have to be closed by the caller, after the
operation completed OperationAttachments.isAutoCloseStreams().
executeOperation in interface ModelControllerClientoperation - the operation to executemessageHandler - the message handler to use for operation progress reporting, or null for noneIOException - if an I/O error occurs while executing the operationpublic org.jboss.threads.AsyncFuture<OperationResponse> executeOperationAsync(Operation operation, OperationMessageHandler messageHandler)
ModelControllerClient
Note that associated input-streams have to be closed by the caller, after the
operation completed OperationAttachments.isAutoCloseStreams().
executeOperationAsync in interface ModelControllerClientoperation - the operation to executemessageHandler - the message handler to use for operation progress reporting, or null for nonepublic byte[] addDeploymentContent(InputStream stream)
DomainClientaddDeploymentContent in interface DomainClientstream - the data stream for the deploymentpublic DomainDeploymentManager getDeploymentManager()
DomainClientDomainDeploymentManager that provides a convenience API
for manipulating domain deployments.getDeploymentManager in interface DomainClientnullpublic List<String> getHostControllerNames()
DomainClientgetHostControllerNames in interface DomainClientnullpublic Map<ServerIdentity,ServerStatus> getServerStatuses()
DomainClientstatus. Servers associated with host controllers that
are currently off line will not be included.getServerStatuses in interface DomainClientnullpublic ServerStatus startServer(String hostControllerName, String serverName)
DomainClientstartServer in interface DomainClienthostControllerName - the name of the host controller responsible for the serverserverName - the name of the servernullpublic ServerStatus stopServer(String hostControllerName, String serverName, long gracefulShutdownTimeout, TimeUnit timeUnit)
DomainClientstopServer in interface DomainClienthostControllerName - the name of the host controller responsible for the serverserverName - the name of the servergracefulShutdownTimeout - maximum period to wait to allow the server
to gracefully handle long running tasks before shutting down,
or -1 to shutdown immediatelytimeUnit - time unit in which gracefulShutdownTimeout is expressednullpublic ServerStatus restartServer(String hostControllerName, String serverName, long gracefulShutdownTimeout, TimeUnit timeUnit)
DomainClientrestartServer in interface DomainClienthostControllerName - the name of the host controller responsible for the serverserverName - the name of the servergracefulShutdownTimeout - maximum period to wait to allow the server
to gracefully handle long running tasks before shutting down,
or -1 to shutdown immediatelytimeUnit - time unit in which gracefulShutdownTimeout is expressednullpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2018 JBoss by Red Hat. All rights reserved.