public class Server extends NamedNode
server-config and server. Make sure to check isStarted()
before reading server related attributes.asProperty| Modifier and Type | Field and Description |
|---|---|
static Server |
STANDALONE |
| Constructor and Description |
|---|
Server(String host,
ModelNode node) |
Server(String host,
Property property) |
| Modifier and Type | Method and Description |
|---|---|
void |
addServerAttributes(ModelNode modelNode)
Adds the
server related attributes to this instance. |
String |
getHost() |
String |
getId()
Unique server identifier containing the host and server name.
|
Version |
getManagementVersion() |
RunningMode |
getRunningMode() |
ResourceAddress |
getServerAddress() |
ResourceAddress |
getServerConfigAddress() |
ServerConfigStatus |
getServerConfigStatus() |
String |
getServerGroup() |
RunningState |
getServerState() |
SuspendState |
getSuspendState() |
boolean |
hasBootErrors() |
boolean |
isAdminMode() |
boolean |
isFailed() |
boolean |
isRunning() |
boolean |
isStandalone() |
boolean |
isStarted()
If this method returns
true it's safe to read the server related attributes like "host", "server-state"
or "suspend-state". |
boolean |
isStarting() |
boolean |
isStopped() |
boolean |
isSuspended() |
boolean |
needsReload() |
boolean |
needsRestart() |
void |
setBootErrors(boolean bootErrors) |
asModelNode, equals, getName, hashCode, jsCreate, setName, toString, updateadd, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, addEmptyList, addEmptyObject, addExpression, as, asBigDecimal, asBigInteger, asBoolean, asBoolean, asBytes, asDouble, asDouble, asInt, asInt, asList, asLong, asLong, asObject, asProperty, asPropertyList, asString, asType, clear, clone, equals, format, fromBase64, get, get, get, getFailureDescription, getType, has, has, hasDefined, hasDefined, isDefined, isFailure, jsAsList, jsAsProperties, jsCreate, jsGetJSONString, keys, protect, remove, require, require, resolve, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, setEmptyList, setEmptyObject, setExpression, setExpression, toBase64String, toJSONString, toJSONString, writeExternalpublic static final Server STANDALONE
public String getId()
public boolean isStandalone()
public Version getManagementVersion()
public boolean hasBootErrors()
public void setBootErrors(boolean bootErrors)
public String getServerGroup()
public String getHost()
public ServerConfigStatus getServerConfigStatus()
server-config.statuspublic RunningState getServerState()
server.server-statuspublic SuspendState getSuspendState()
server.suspend-statepublic RunningMode getRunningMode()
server.running-modepublic boolean isStarted()
true it's safe to read the server related attributes like "host", "server-state"
or "suspend-state".public boolean isStarting()
public boolean isRunning()
true if the server is running, false if not or if
needsReload() or needsRestart() is true.public boolean isAdminMode()
public boolean isSuspended()
public boolean isStopped()
public boolean isFailed()
true if the getServerConfigStatus() == ServerConfigStatus.FAILED, false otherwise. Does not take hasBootErrors() into account!public boolean needsRestart()
public boolean needsReload()
public ResourceAddress getServerConfigAddress()
/host=<host>/server-config=<server> address or ResourceAddress.root() if
either host or server-config is undefined.public ResourceAddress getServerAddress()
/host=<host>/server=<server> address or ResourceAddress.root() if either
host or server is undefined.public void addServerAttributes(ModelNode modelNode)
server related attributes to this instance. Existing attributes will be overwritten.Copyright © 2018 JBoss, a division of Red Hat. All rights reserved.