public class DomainClientImpl extends Object implements DomainClient
DomainClient.Factory| Constructor and Description |
|---|
DomainClientImpl(InetAddress address,
int port) |
DomainClientImpl(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() |
org.jboss.dmr.ModelNode |
execute(org.jboss.dmr.ModelNode operation)
Execute an operation synchronously.
|
org.jboss.dmr.ModelNode |
execute(org.jboss.dmr.ModelNode operation,
OperationMessageHandler messageHandler)
Execute an operation synchronously, optionally receiving progress reports.
|
org.jboss.dmr.ModelNode |
execute(Operation operation)
Execute an operation synchronously.
|
org.jboss.dmr.ModelNode |
execute(Operation operation,
OperationMessageHandler messageHandler)
Execute an operation synchronously, optionally receiving progress reports.
|
org.jboss.threads.AsyncFuture<org.jboss.dmr.ModelNode> |
executeAsync(org.jboss.dmr.ModelNode operation,
OperationMessageHandler messageHandler)
Execute an operation.
|
org.jboss.threads.AsyncFuture<org.jboss.dmr.ModelNode> |
executeAsync(Operation operation,
OperationMessageHandler messageHandler)
Execute an operation.
|
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.
|
public DomainClientImpl(InetAddress address, int port)
public DomainClientImpl(InetAddress address, int port, CallbackHandler handler)
public org.jboss.dmr.ModelNode execute(org.jboss.dmr.ModelNode operation)
throws IOException
ModelControllerClientexecute in interface ModelControllerClientoperation - the operation to executeIOException - if an I/O error occurs while executing the operationpublic org.jboss.dmr.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 org.jboss.dmr.ModelNode execute(org.jboss.dmr.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 org.jboss.dmr.ModelNode execute(Operation operation, OperationMessageHandler messageHandler) throws IOException
ModelControllerClientOperationAttachments.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<org.jboss.dmr.ModelNode> executeAsync(org.jboss.dmr.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<org.jboss.dmr.ModelNode> executeAsync(Operation operation, OperationMessageHandler messageHandler)
ModelControllerClientOperationAttachments.isAutoCloseStreams().executeAsync 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 © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.