Interface ServerManager
-
- All Known Subinterfaces:
DomainManager
- All Known Implementing Classes:
AbstractDomainManager
public interface ServerManagerA manager that allows control of the server lifecycle. Note that if this is not associated with a manual mode container operations will fail.- Author:
- James R. Perkins
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetServerGroupName(String hostName, String serverName)The group name this server is associated with this server.booleanisServerStarted(String hostName, String serverName)Checks the status of the server and returnstrueif the server is fully started.voidrestartServer(String hostName, String serverName)Restarts the server.voidresumeServer(String hostName, String serverName)Resumes this server after being suspended.voidstartServer(String hostName, String serverName)Starts the server.voidstopServer(String hostName, String serverName)Stops the server.voidsuspendServer(String hostName, String serverName, int timeout)Suspends this server.
-
-
-
Method Detail
-
startServer
void startServer(String hostName, String serverName)
Starts the server.- Parameters:
hostName- the name of the host the server is onserverName- the name of the server- Throws:
IllegalStateException- if lifecycle operations are not allowedRuntimeException- if the start operation fails
-
stopServer
void stopServer(String hostName, String serverName)
Stops the server.- Parameters:
hostName- the name of the host the server is onserverName- the name of the server- Throws:
IllegalStateException- if lifecycle operations are not allowedRuntimeException- if the stop operation fails
-
isServerStarted
boolean isServerStarted(String hostName, String serverName)
Checks the status of the server and returnstrueif the server is fully started.- Parameters:
hostName- the name of the host the server is onserverName- the name of the server- Returns:
trueif the server is fully started, otherwisefalse- Throws:
RuntimeException- if the operation fails
-
restartServer
void restartServer(String hostName, String serverName)
Restarts the server.- Parameters:
hostName- the name of the host the server is onserverName- the name of the server- Throws:
IllegalStateException- if lifecycle operations are not allowedRuntimeException- if the restart operation fails
-
resumeServer
void resumeServer(String hostName, String serverName)
Resumes this server after being suspended.- Parameters:
hostName- the name of the host the server is onserverName- the name of the server- Throws:
IllegalStateException- if lifecycle operations are not allowedRuntimeException- if the resume operation fails
-
suspendServer
void suspendServer(String hostName, String serverName, int timeout)
Suspends this server.- Parameters:
hostName- the name of the host the server is onserverName- the name of the servertimeout- the timeout for the suspend- Throws:
IllegalStateException- if lifecycle operations are not allowedRuntimeException- if the suspend operation fails
-
getServerGroupName
String getServerGroupName(String hostName, String serverName)
The group name this server is associated with this server.- Parameters:
hostName- the name of the host the server is onserverName- the name of the server- Returns:
- the group name
- Throws:
RuntimeException- if the operation fails
-
-