Class ManagementClient

  • All Implemented Interfaces:
    Closeable, AutoCloseable

    public class ManagementClient
    extends Object
    implements Closeable
    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 Detail

      • ManagementClient

        public ManagementClient​(org.jboss.as.controller.client.ModelControllerClient client,
                                String mgmtAddress,
                                int managementPort,
                                String protocol)
      • ManagementClient

        public ManagementClient​(org.jboss.as.controller.client.ModelControllerClient client,
                                CommonContainerConfiguration config)
    • Method Detail

      • 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

        public URI 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:
        true if the server is running, otherwise false
        Throws:
        IllegalStateException - if this has been closed
      • isClosed

        public boolean isClosed()
        Checks whether or not the client has been closed.
        Returns:
        true if the client has been closed otherwise false
      • getMgmtPort

        public int getMgmtPort()
      • getMgmtAddress

        public String getMgmtAddress()
      • getMgmtProtocol

        public String getMgmtProtocol()
      • getRemoteEjbURL

        public URI getRemoteEjbURL()
        Returns the URI for EJB's.
        Returns:
        the resolved EJB URI
        Throws:
        IllegalStateException - if this has been closed