Package org.jboss.hal.core.runtime.host
Class Host
- java.lang.Object
-
- org.jboss.hal.dmr.ModelNode
-
- org.jboss.hal.dmr.NamedNode
-
- org.jboss.hal.core.runtime.HasServersNode
-
- org.jboss.hal.core.runtime.host.Host
-
- All Implemented Interfaces:
Cloneable,NamedObject
public class Host extends HasServersNode
For the host we need to distinguish between the address-name (the name which is part of the host address) and the model-node-name (the name which is part of the host model node). When the latter is changed, the former remains unchanged until the host is reloaded.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Hostbooting(String name)Marks a host as booting.static Hostdisconnected(String name, Date disconnected, Date lastConnected)static Hostfailed(String name)ResourceAddressgetAddress()StringgetAddressName()DategetDisconnected()RunningStategetHostState()DategetLastConnected()VersiongetManagementVersion()RunningModegetRunningMode()booleanisAdminMode()booleanisAlive()booleanisBooting()booleanisConnected()booleanisDomainController()booleanisFailed()booleanisRunning()booleanisStarting()booleanneedsReload()booleanneedsRestart()static List<Host>sort(List<Host> hosts)Sorts the specified hosts alphabetically with the domain controller as first element.-
Methods inherited from class org.jboss.hal.core.runtime.HasServersNode
addServer, getServers, getServers, hasServers, hasServers
-
Methods inherited from class org.jboss.hal.dmr.NamedNode
asModelNode, equals, getName, hashCode, setName, toString, update
-
Methods inherited from class org.jboss.hal.dmr.ModelNode
add, 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, fromBase64, get, get, get, getFailureDescription, getType, has, has, hasDefined, hasDefined, isDefined, isFailure, 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, writeExternal
-
-
-
-
Method Detail
-
sort
public static List<Host> sort(List<Host> hosts)
Sorts the specified hosts alphabetically with the domain controller as first element.
-
booting
public static Host booting(String name)
Marks a host as booting. In contrast toRunningState.STARTING, booting means that the host name is known abd returned by:read-child-names(child-type=host), but the resource itself is not readable (/host=foo:read-resourcereturnsWFLYCTL0379). This applies to hosts with management model<10.0.0.- Parameters:
name- the host name- Returns:
- A host marked as booting
-
getAddressName
public String getAddressName()
-
getManagementVersion
public Version getManagementVersion()
-
isConnected
public boolean isConnected()
-
getDisconnected
public Date getDisconnected()
-
getLastConnected
public Date getLastConnected()
-
isDomainController
public boolean isDomainController()
-
getHostState
public RunningState getHostState()
-
getRunningMode
public RunningMode getRunningMode()
- Returns:
- the state as defined by
server.running-mode
-
isAlive
public boolean isAlive()
-
isBooting
public boolean isBooting()
-
isStarting
public boolean isStarting()
-
isRunning
public boolean isRunning()
-
isAdminMode
public boolean isAdminMode()
-
isFailed
public boolean isFailed()
-
needsRestart
public boolean needsRestart()
-
needsReload
public boolean needsReload()
-
getAddress
public ResourceAddress getAddress()
-
-