Interface DomainClient
-
- All Superinterfaces:
AutoCloseable
,Closeable
,ModelControllerClient
- All Known Implementing Classes:
DomainClientImpl
public interface DomainClient extends ModelControllerClient
Client interface used to interact with the domain management infrastructure. THis interface allows clients to get information about the domain as well as apply updates to the domain.- Author:
- John Bailey
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
DomainClient.Factory
Factory used to create anDomainClient
instance for a remote address and port.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description byte[]
addDeploymentContent(InputStream stream)
Add the content for a deployment to the domain controller.DomainDeploymentManager
getDeploymentManager()
Gets aDomainDeploymentManager
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 currentstatus
.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.-
Methods inherited from interface org.jboss.as.controller.client.ModelControllerClient
execute, execute, execute, execute, executeAsync, executeAsync, executeAsync, executeAsync, executeOperation, executeOperationAsync
-
-
-
-
Method Detail
-
getHostControllerNames
List<String> getHostControllerNames()
Gets the list of currently running host controllers.- Returns:
- the names of the host controllers. Will not be
null
-
addDeploymentContent
byte[] addDeploymentContent(InputStream stream)
Add the content for a deployment to the domain controller. Note thatthe DomainDeploymentManager offers a more convenient API for manipulating domain deployments.
- Parameters:
stream
- the data stream for the deployment- Returns:
- the unique hash for the deployment
-
getDeploymentManager
DomainDeploymentManager getDeploymentManager()
Gets aDomainDeploymentManager
that provides a convenience API for manipulating domain deployments.- Returns:
- the deployment manager. Will not be
null
-
getServerStatuses
Map<ServerIdentity,ServerStatus> getServerStatuses()
Gets a list of all servers known to the domain, along with their currentstatus
. Servers associated with host controllers that are currently off line will not be included.- Returns:
- the servers and their current status. Will not be
null
-
startServer
ServerStatus startServer(String hostControllerName, String serverName)
Starts the given server. Ignored if the server is not stopped.- Parameters:
hostControllerName
- the name of the host controller responsible for the serverserverName
- the name of the server- Returns:
- the status of the server following the start. Will not be
null
-
stopServer
ServerStatus stopServer(String hostControllerName, String serverName, long gracefulShutdownTimeout, TimeUnit timeUnit)
Stops the given server.- Parameters:
hostControllerName
- 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 whichgracefulShutdownTimeout
is expressed- Returns:
- the status of the server following the stop. Will not be
null
-
restartServer
ServerStatus restartServer(String hostControllerName, String serverName, long gracefulShutdownTimeout, TimeUnit timeUnit)
Restarts the given server.- Parameters:
hostControllerName
- 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 whichgracefulShutdownTimeout
is expressed- Returns:
- the status of the server following the restart. Will not be
null
-
-