public interface 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
|
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 processName,
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.
|
ServerStatus |
reloadServer(String serverName,
boolean blocking)
Reload a server with the given name.
|
ServerStatus |
restartServer(String serverName,
int gracefulTimeout,
org.jboss.dmr.ModelNode domainModel)
Restart the server with the given name.
|
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 channelHandler)
Notification that a channel for communication with a managed server process has been registered.
|
void |
serverProcessAdded(String processName)
Notification that a server has been added to the process-controller.
|
void |
serverProcessRemoved(String processName)
Notification that a server has been removed from the process-controller.
|
void |
serverProcessStarted(String processName)
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.
|
ServerStatus |
startServer(String serverName,
org.jboss.dmr.ModelNode domainModel)
Start the server with the given name.
|
ServerStatus |
startServer(String serverName,
org.jboss.dmr.ModelNode domainModel,
boolean blocking)
Start the server with the given name.
|
ServerStatus |
stopServer(String serverName,
int gracefulTimeout)
Stop the server with the given name.
|
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.
|
String getServerProcessName(String serverName)
serverName
- the name of a server in the modelString getProcessServerName(String processName)
processName
- the name of the server processMap<String,ProcessInfo> determineRunningProcesses()
Map<String,ProcessInfo> determineRunningProcesses(boolean serversOnly)
serversOnly
- true
to only return the server processesServerStatus determineServerStatus(String serverName)
serverName
- the server name. Cannot be null
null
; will return ServerStatus.STOPPED
for unknown serversServerStatus startServer(String serverName, org.jboss.dmr.ModelNode domainModel)
serverName
- the name of the serverdomainModel
- the configuration model for the domainServerStatus startServer(String serverName, org.jboss.dmr.ModelNode domainModel, boolean blocking)
serverName
- the name of the serverdomainModel
- the configuration model for the domainblocking
- whether to block until the server is startedServerStatus restartServer(String serverName, int gracefulTimeout, org.jboss.dmr.ModelNode domainModel)
serverName
- 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 domainServerStatus restartServer(String serverName, int gracefulTimeout, org.jboss.dmr.ModelNode domainModel, boolean blocking)
serverName
- 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 restartedServerStatus stopServer(String serverName, int gracefulTimeout)
serverName
- the name of the servergracefulTimeout
- time in ms the server should allow for graceful shutdown (if supported) before terminating all servicesServerStatus stopServer(String serverName, int gracefulTimeout, boolean blocking)
serverName
- 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 stoppedvoid stopServers(int gracefulTimeout)
gracefulTimeout
- time in ms a server should allow for graceful shutdown (if supported) before terminating all servicesvoid stopServers(int gracefulTimeout, boolean blockUntilStopped)
blockUntilStopped
is set to true
returning from this method
does not mean the servers are completely stopped;gracefulTimeout
- time in ms a server should allow for graceful shutdown (if supported) before terminating all servicesblockUntilStopped
- wait until all servers are stoppedvoid reconnectServer(String serverName, org.jboss.dmr.ModelNode domainModel, String authKey, boolean running, boolean stopping)
serverName
- 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 stoppingServerStatus reloadServer(String serverName, boolean blocking)
serverName
- the name of the servervoid destroyServer(String serverName)
serverName
- the server namevoid killServer(String serverName)
serverName
- the server nameCallbackHandler getServerCallbackHandler()
null
ProxyController serverCommunicationRegistered(String serverProcessName, ManagementChannelHandler channelHandler)
serverProcessName
- the name of the server processchannelHandler
- remoting channel to use for communicating with the serverboolean serverReconnected(String serverProcessName, ManagementChannelHandler channelHandler)
serverProcessName
- the name of the server processchannelHandler
- mgmt channel handler for communication with the servertrue
if the server is still in sync, false
otherwisevoid serverStarted(String serverProcessName)
serverProcessName
- the name of the server processvoid serverStartFailed(String serverProcessName)
serverProcessName
- the name of the server processvoid serverProcessStopped(String serverProcessName)
serverProcessName
- the name of the server processvoid connectionFinished()
void serverProcessAdded(String processName)
processName
- the process namevoid serverProcessStarted(String processName)
processName
- the process namevoid serverProcessRemoved(String processName)
processName
- the process namevoid operationFailed(String processName, ProcessMessageHandler.OperationType type)
processName
- the process nametype
- the operation typevoid processInventory(Map<String,ProcessInfo> processInfos)
processInfos
- map of process name to information about the processvoid awaitServersState(Collection<String> serverNames, boolean started)
serverNames
- the server names in the groupstarted
- whether to wait for the started, or the stopped notificationInterruptedException
void suspendServer(String serverName)
serverName
- The server namevoid resumeServer(String serverName)
serverName
- The server nameboolean awaitServerSuspend(Set<String> waitForServers, int timeoutInSeconds)
waitForServers
- The servers to wait fortimeoutInSeconds
- The maximum amount of time to wait in seconds, with -1 meaning indefinitlytrue
if all the servers suspended in timeCopyright © 2023 JBoss by Red Hat. All rights reserved.