Class ManagementClient
java.lang.Object
org.jboss.as.arquillian.container.ManagementClient
- All Implemented Interfaces:
Closeable,AutoCloseable
A helper class to join management related operations, like extract sub system ip/port (web/jmx)
and deployment introspection.
Instances of this type are not thread-safe.
- Author:
- Aslak Knutsen
-
Constructor Summary
ConstructorsConstructorDescriptionManagementClient(org.jboss.as.controller.client.ModelControllerClient client, String mgmtAddress, int managementPort, String protocol) ManagementClient(org.jboss.as.controller.client.ModelControllerClient client, CommonContainerConfiguration config) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()org.jboss.as.controller.client.ModelControllerClientReturns the client used to connect to the server.intorg.jboss.arquillian.container.spi.client.protocol.metadata.ProtocolMetaDatagetProtocolMetaData(String deploymentName) Gets the meta-data.Returns the URI for EJB's.booleanisClosed()Checks whether or not the client has been closed.booleanChecks whether or not the server is running.
-
Constructor Details
-
ManagementClient
-
ManagementClient
public ManagementClient(org.jboss.as.controller.client.ModelControllerClient client, CommonContainerConfiguration config)
-
-
Method Details
-
getControllerClient
public org.jboss.as.controller.client.ModelControllerClient getControllerClient()Returns the client used to connect to the server.- Returns:
- the client
- Throws:
IllegalStateException- if this has been closed
-
getWebUri
- Returns:
- The base URI or the web susbsystem. Usually http://localhost:8080
- Throws:
IllegalStateException- if this has been closed
-
getProtocolMetaData
public org.jboss.arquillian.container.spi.client.protocol.metadata.ProtocolMetaData getProtocolMetaData(String deploymentName) Gets the meta-data.- Returns:
- the meta-data
- Throws:
IllegalStateException- if this has been closed
-
isServerInRunningState
public boolean isServerInRunningState()Checks whether or not the server is running.Note that if this client has been closed the state of the server cannot be checked.
- Returns:
trueif the server is running, otherwisefalse- Throws:
IllegalStateException- if this has been closed
-
isClosed
public boolean isClosed()Checks whether or not the client has been closed.- Returns:
trueif the client has been closed otherwisefalse
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
getRemoteJMXURL
-
getMgmtPort
public int getMgmtPort() -
getMgmtAddress
-
getMgmtProtocol
-
getRemoteEjbURL
Returns the URI for EJB's.- Returns:
- the resolved EJB URI
- Throws:
IllegalStateException- if this has been closed
-