public class ServerInventoryImpl extends Object implements ServerInventory
| Modifier and Type | Method and Description |
|---|---|
void |
awaitServersState(Collection<String> serverNames,
boolean started)
Await for a group of servers to be either started or stopped.
|
boolean |
awaitServerSuspend(Set<String> waitForServers,
int timeoutInSeconds)
Suspends and waits for the given set of servers to suspend up to the timeout
|
void |
connectionFinished()
Signal the end of the PC connection, regardless of the reason.
|
void |
destroyServer(String serverName)
Destroy a stopping server process.
|
Map<String,ProcessInfo> |
determineRunningProcesses()
Gets information on all the running processes
|
Map<String,ProcessInfo> |
determineRunningProcesses(boolean serversOnly)
Gets information on all the running processes
|
org.jboss.as.controller.client.helpers.domain.ServerStatus |
determineServerStatus(String serverName)
Get the status of the server with the given name.
|
String |
getProcessServerName(String processName)
Gets the server model name for a process
|
CallbackHandler |
getServerCallbackHandler()
Gets a callback handler security services can use for handling authentication data provided by
a server attempting to connect with this host controller.
|
String |
getServerProcessName(String serverName)
Gets the process name for a server
|
void |
killServer(String serverName)
Try to kill a server process.
|
void |
operationFailed(String serverProcessName,
ProcessMessageHandler.OperationType type)
Notification that an operation failed on the process-controller.
|
void |
processInventory(Map<String,ProcessInfo> processInfos)
Notification that managed server process information is available.
|
void |
reconnectServer(String serverName,
org.jboss.dmr.ModelNode domainModel,
String authKey,
boolean running,
boolean stopping)
Re-establishes management communications with a server following a restart of the Host Controller process.
|
org.jboss.as.controller.client.helpers.domain.ServerStatus |
reloadServer(String serverName,
boolean blocking)
Reload a server with the given name.
|
org.jboss.as.controller.client.helpers.domain.ServerStatus |
restartServer(String serverName,
int gracefulTimeout,
org.jboss.dmr.ModelNode domainModel)
Restart the server with the given name.
|
org.jboss.as.controller.client.helpers.domain.ServerStatus |
restartServer(String serverName,
int gracefulTimeout,
org.jboss.dmr.ModelNode domainModel,
boolean blocking)
Restart the server with the given name.
|
void |
resumeServer(String serverName)
Resumes a server, allowing it to begin processing requests normally
|
ProxyController |
serverCommunicationRegistered(String serverProcessName,
ManagementChannelHandler channelAssociation)
Notification that a channel for communication with a managed server process has been registered.
|
void |
serverProcessAdded(String serverProcessName)
Notification that a server has been added to the process-controller.
|
void |
serverProcessRemoved(String serverProcessName)
Notification that a server has been removed from the process-controller.
|
void |
serverProcessStarted(String serverProcessName)
Notification that a server process has been started.
|
void |
serverProcessStopped(String serverProcessName)
Notification that a server has stopped.
|
boolean |
serverReconnected(String serverProcessName,
ManagementChannelHandler channelHandler)
Notification that a server has been reconnected.
|
void |
serverStarted(String serverProcessName)
Notification that the server is started.
|
void |
serverStartFailed(String serverProcessName)
Notification that the start of a server process has failed.
|
org.jboss.as.controller.client.helpers.domain.ServerStatus |
startServer(String serverName,
org.jboss.dmr.ModelNode domainModel)
Start the server with the given name.
|
org.jboss.as.controller.client.helpers.domain.ServerStatus |
startServer(String serverName,
org.jboss.dmr.ModelNode domainModel,
boolean blocking)
Start the server with the given name.
|
org.jboss.as.controller.client.helpers.domain.ServerStatus |
stopServer(String serverName,
int gracefulTimeout)
Stop the server with the given name.
|
org.jboss.as.controller.client.helpers.domain.ServerStatus |
stopServer(String serverName,
int gracefulTimeout,
boolean blocking)
Stop the server with the given name.
|
void |
stopServers(int gracefulTimeout)
Stop all servers.
|
void |
stopServers(int gracefulTimeout,
boolean blockUntilStopped)
Stop all servers.
|
void |
suspendServer(String serverName)
Suspends a server, allowing current requests to finish and blocking any new requests
from starting.
|
public String getServerProcessName(String serverName)
ServerInventorygetServerProcessName in interface ServerInventoryserverName - the name of a server in the modelpublic String getProcessServerName(String processName)
ServerInventorygetProcessServerName in interface ServerInventoryprocessName - the name of the server processpublic Map<String,ProcessInfo> determineRunningProcesses()
ServerInventorydetermineRunningProcesses in interface ServerInventorypublic Map<String,ProcessInfo> determineRunningProcesses(boolean serversOnly)
ServerInventorydetermineRunningProcesses in interface ServerInventoryserversOnly - true to only return the server processespublic org.jboss.as.controller.client.helpers.domain.ServerStatus determineServerStatus(String serverName)
ServerInventorydetermineServerStatus in interface ServerInventoryserverName - the server name. Cannot be nullnull; will return ServerStatus.STOPPED for unknown serverspublic org.jboss.as.controller.client.helpers.domain.ServerStatus startServer(String serverName, org.jboss.dmr.ModelNode domainModel)
ServerInventorystartServer in interface ServerInventoryserverName - the name of the serverdomainModel - the configuration model for the domainpublic org.jboss.as.controller.client.helpers.domain.ServerStatus startServer(String serverName, org.jboss.dmr.ModelNode domainModel, boolean blocking)
ServerInventorystartServer in interface ServerInventoryserverName - the name of the serverdomainModel - the configuration model for the domainblocking - whether to block until the server is startedpublic org.jboss.as.controller.client.helpers.domain.ServerStatus restartServer(String serverName, int gracefulTimeout, org.jboss.dmr.ModelNode domainModel)
ServerInventoryrestartServer in interface ServerInventoryserverName - the name of the servergracefulTimeout - time in ms the server should allow for graceful shutdown (if supported) before terminating all servicesdomainModel - the configuration model for the domainpublic org.jboss.as.controller.client.helpers.domain.ServerStatus restartServer(String serverName, int gracefulTimeout, org.jboss.dmr.ModelNode domainModel, boolean blocking)
ServerInventoryrestartServer in interface ServerInventoryserverName - the name of the servergracefulTimeout - time in ms the server should allow for graceful shutdown (if supported) before terminating all servicesdomainModel - the configuration model for the domainblocking - whether to block until the server is restartedpublic org.jboss.as.controller.client.helpers.domain.ServerStatus stopServer(String serverName, int gracefulTimeout)
ServerInventorystopServer in interface ServerInventoryserverName - the name of the servergracefulTimeout - time in ms the server should allow for graceful shutdown (if supported) before terminating all servicespublic org.jboss.as.controller.client.helpers.domain.ServerStatus stopServer(String serverName, int gracefulTimeout, boolean blocking)
ServerInventorystopServer in interface ServerInventoryserverName - the name of the servergracefulTimeout - time in ms the server should allow for graceful shutdown (if supported) before terminating all servicesblocking - whether to block until the server is stoppedpublic void reconnectServer(String serverName, org.jboss.dmr.ModelNode domainModel, String authKey, boolean running, boolean stopping)
ServerInventoryreconnectServer in interface ServerInventoryserverName - the name of the serverdomainModel - the configuration model for the domainauthKey - the authentication keyrunning - whether the process was running. If false, the existence of the server will be
recorded but no attempt to contact it will be madestopping - whether the process is currently stoppingpublic org.jboss.as.controller.client.helpers.domain.ServerStatus reloadServer(String serverName, boolean blocking)
ServerInventoryreloadServer in interface ServerInventoryserverName - the name of the serverpublic void destroyServer(String serverName)
ServerInventorydestroyServer in interface ServerInventoryserverName - the server namepublic void killServer(String serverName)
ServerInventorykillServer in interface ServerInventoryserverName - the server namepublic void stopServers(int gracefulTimeout)
ServerInventorystopServers in interface ServerInventorygracefulTimeout - time in ms a server should allow for graceful shutdown (if supported) before terminating all servicespublic void stopServers(int gracefulTimeout,
boolean blockUntilStopped)
ServerInventoryblockUntilStopped is set to true returning from this method
does not mean the servers are completely stopped;stopServers in interface ServerInventorygracefulTimeout - time in ms a server should allow for graceful shutdown (if supported) before terminating all servicesblockUntilStopped - wait until all servers are stoppedpublic void awaitServersState(Collection<String> serverNames, boolean started)
ServerInventoryawaitServersState in interface ServerInventoryserverNames - the server names in the groupstarted - whether to wait for the started, or the stopped notificationpublic void suspendServer(String serverName)
ServerInventorysuspendServer in interface ServerInventoryserverName - The server namepublic void resumeServer(String serverName)
ServerInventoryresumeServer in interface ServerInventoryserverName - The server namepublic boolean awaitServerSuspend(Set<String> waitForServers, int timeoutInSeconds)
ServerInventoryawaitServerSuspend in interface ServerInventorywaitForServers - The servers to wait fortimeoutInSeconds - The maximum amount of time to wait in seconds, with -1 meaning indefinitlytrue if all the servers suspended in timepublic ProxyController serverCommunicationRegistered(String serverProcessName, ManagementChannelHandler channelAssociation)
ServerInventoryserverCommunicationRegistered in interface ServerInventoryserverProcessName - the name of the server processchannelAssociation - remoting channel to use for communicating with the serverpublic boolean serverReconnected(String serverProcessName, ManagementChannelHandler channelHandler)
ServerInventoryserverReconnected in interface ServerInventoryserverProcessName - the name of the server processchannelHandler - mgmt channel handler for communication with the servertrue if the server is still in sync, false otherwisepublic void serverProcessStopped(String serverProcessName)
ServerInventoryserverProcessStopped in interface ServerInventoryserverProcessName - the name of the server processpublic void connectionFinished()
ServerInventoryconnectionFinished in interface ServerInventorypublic void serverStarted(String serverProcessName)
ServerInventoryserverStarted in interface ServerInventoryserverProcessName - the name of the server processpublic void serverStartFailed(String serverProcessName)
ServerInventoryserverStartFailed in interface ServerInventoryserverProcessName - the name of the server processpublic void serverProcessAdded(String serverProcessName)
ServerInventoryserverProcessAdded in interface ServerInventoryserverProcessName - the process namepublic void serverProcessStarted(String serverProcessName)
ServerInventoryserverProcessStarted in interface ServerInventoryserverProcessName - the process namepublic void serverProcessRemoved(String serverProcessName)
ServerInventoryserverProcessRemoved in interface ServerInventoryserverProcessName - the process namepublic void operationFailed(String serverProcessName, ProcessMessageHandler.OperationType type)
ServerInventoryoperationFailed in interface ServerInventoryserverProcessName - the process nametype - the operation typepublic void processInventory(Map<String,ProcessInfo> processInfos)
ServerInventoryprocessInventory in interface ServerInventoryprocessInfos - map of process name to information about the processpublic CallbackHandler getServerCallbackHandler()
ServerInventorygetServerCallbackHandler in interface ServerInventorynullCopyright © 2016 JBoss by Red Hat. All rights reserved.