Class Server

  • All Implemented Interfaces:
    Cloneable, NamedObject

    public class Server
    extends NamedNode
    Combination of the two resources server-config and server. Make sure to check isStarted() before reading server related attributes.
    • Field Detail

      • STANDALONE

        public static final Server STANDALONE
    • Method Detail

      • getId

        public String getId()
        Unique server identifier containing the host and server name.
      • isStandalone

        public boolean isStandalone()
      • getManagementVersion

        public Version getManagementVersion()
      • hasBootErrors

        public boolean hasBootErrors()
      • setBootErrors

        public void setBootErrors​(boolean bootErrors)
      • hasOperationFailure

        public boolean hasOperationFailure()
      • setOperationFailure

        public void setOperationFailure​(String operationFailure)
      • getServerGroup

        public String getServerGroup()
      • getHost

        public String getHost()
      • getServerConfigStatus

        public ServerConfigStatus getServerConfigStatus()
        Returns:
        the status as defined by server-config.status
      • getServerState

        public RunningState getServerState()
        Returns:
        the state as defined by server.server-status
      • getSuspendState

        public SuspendState getSuspendState()
        Returns:
        the state as defined by server.suspend-state
      • getRunningMode

        public RunningMode getRunningMode()
        Returns:
        the state as defined by server.running-mode
      • isStarted

        public boolean isStarted()
        If this method returns true it's safe to read the server related attributes like "host", "server-state" or "suspend-state".
      • isStarting

        public boolean isStarting()
      • isRunning

        public boolean isRunning()
        Returns:
        true if the server is running, false if not or if needsReload() or needsRestart() is true.
      • isAdminMode

        public boolean isAdminMode()
      • isSuspended

        public boolean isSuspended()
      • isStopped

        public boolean isStopped()
      • needsRestart

        public boolean needsRestart()
      • needsReload

        public boolean needsReload()
      • getServerConfigAddress

        public ResourceAddress getServerConfigAddress()
        Returns:
        the /host=<host>/server-config=<server> address or ResourceAddress.root() if either host or server-config is undefined.
      • getServerAddress

        public ResourceAddress getServerAddress()
        Returns:
        the /host=<host>/server=<server> address or ResourceAddress.root() if either host or server is undefined.
      • addServerAttributes

        public void addServerAttributes​(ModelNode modelNode)
        Adds the server related attributes to this instance. Existing attributes will be overwritten.