Class ManagementClient
- java.lang.Object
-
- org.jboss.as.arquillian.container.domain.ManagementClient
-
public class ManagementClient extends Object
A helper class to join management related operations, like extract sub system ip/port (web/jmx) and deployment introspection.- Author:
- Aslak Knutsen
-
-
Constructor Summary
Constructors Modifier Constructor Description ManagementClient(org.jboss.as.controller.client.ModelControllerClient client, String mgmtAddress, int managementPort)Creates a new management client.protectedManagementClient(org.jboss.as.controller.client.ModelControllerClient client, DomainManager domainManager)Creates a new management client.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()DomaincreateDomain(Map<String,String> containerNameMap)org.jboss.as.controller.client.helpers.domain.DomainClientgetControllerClient()org.jboss.arquillian.container.spi.client.protocol.metadata.HTTPContextgetHTTPDeploymentMetaData(Domain.Server server, String uniqueDeploymentName)StringgetServerState(Domain.Server server)booleanisDomainInRunningState()booleanisServerStarted(Domain.Server server)voidstartServer(Domain.Server server)Starts the server on the host.voidstartServerGroup(String groupName)Starts the servers in the server group.voidstopServer(Domain.Server server)Stops the server on the host.voidstopServerGroup(String groupName)Stops the servers in the server group.
-
-
-
Constructor Detail
-
ManagementClient
protected ManagementClient(org.jboss.as.controller.client.ModelControllerClient client, DomainManager domainManager)Creates a new management client.- Parameters:
client- the client to delegate management operations todomainManager- the domain manager
-
ManagementClient
public ManagementClient(org.jboss.as.controller.client.ModelControllerClient client, String mgmtAddress, int managementPort)Creates a new management client.- Parameters:
client- the client to delegate management operations tomgmtAddress- not usedmanagementPort- not used
-
-
Method Detail
-
getControllerClient
public org.jboss.as.controller.client.helpers.domain.DomainClient getControllerClient()
-
getServerState
public String getServerState(Domain.Server server)
-
getHTTPDeploymentMetaData
public org.jboss.arquillian.container.spi.client.protocol.metadata.HTTPContext getHTTPDeploymentMetaData(Domain.Server server, String uniqueDeploymentName)
-
startServerGroup
public void startServerGroup(String groupName)
Starts the servers in the server group.- Parameters:
groupName- the server group to start the servers for- Throws:
IllegalStateException- if the lifecycle is controlled by Arquillian or no container has been started
-
stopServerGroup
public void stopServerGroup(String groupName)
Stops the servers in the server group.- Parameters:
groupName- the server group to stop the servers for- Throws:
IllegalStateException- if the lifecycle is controlled by Arquillian or no container has been started
-
startServer
public void startServer(Domain.Server server)
Starts the server on the host.- Parameters:
server- the server to start- Throws:
IllegalStateException- if the lifecycle is controlled by Arquillian or no container has been started
-
stopServer
public void stopServer(Domain.Server server)
Stops the server on the host.- Parameters:
server- the server to stop- Throws:
IllegalStateException- if the lifecycle is controlled by Arquillian or no container has been started
-
isServerStarted
public boolean isServerStarted(Domain.Server server)
-
isDomainInRunningState
public boolean isDomainInRunningState()
-
close
public void close()
-
-