Package org.apache.synapse
Class ServerManagerView
- java.lang.Object
-
- org.apache.synapse.ServerManagerView
-
- All Implemented Interfaces:
ServerManagerViewMBean
public class ServerManagerView extends Object implements ServerManagerViewMBean
- See Also:
ServerManagerViewMBean
-
-
Constructor Summary
Constructors Constructor Description ServerManagerView(ServerManager serverManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
endMaintenance()
Finishes the maintenance and put the server online.String
getServerState()
Shows the current state of the server.void
restart()
Restart the Server.void
shutdown()
Shutdown the Server.void
start()
Starts the Server.void
startMaintenance()
Puts the server into the maintenance mode.void
stop()
Stops the Server without shutting it down.void
stopGracefully(long waitSeconds)
Stops the Server gracefully.
-
-
-
Constructor Detail
-
ServerManagerView
public ServerManagerView(ServerManager serverManager)
-
-
Method Detail
-
getServerState
public String getServerState()
Shows the current state of the server.- Specified by:
getServerState
in interfaceServerManagerViewMBean
- Returns:
- the current state of the server
-
start
public void start() throws Exception
Starts the Server.- Specified by:
start
in interfaceServerManagerViewMBean
- Throws:
Exception
- if an error occurs
-
stop
public void stop() throws Exception
Stops the Server without shutting it down.- Specified by:
stop
in interfaceServerManagerViewMBean
- Throws:
Exception
- if an error occurs
-
restart
public void restart() throws Exception
Restart the Server.- Specified by:
restart
in interfaceServerManagerViewMBean
- Throws:
Exception
- if an error occurs
-
shutdown
public void shutdown() throws Exception
Shutdown the Server.- Specified by:
shutdown
in interfaceServerManagerViewMBean
- Throws:
Exception
- if an error occurs
-
stopGracefully
public void stopGracefully(long waitSeconds) throws Exception
Stops the Server gracefully. This includes putting the server in maintenance and stopping it.- Specified by:
stopGracefully
in interfaceServerManagerViewMBean
- Parameters:
waitSeconds
- number of seconds to wait for a graceful stop before initiating a hard stop- Throws:
Exception
- if an error occurs
-
startMaintenance
public void startMaintenance() throws Exception
Puts the server into the maintenance mode.- Specified by:
startMaintenance
in interfaceServerManagerViewMBean
- Throws:
Exception
- if an error occurs
-
endMaintenance
public void endMaintenance() throws Exception
Finishes the maintenance and put the server online.- Specified by:
endMaintenance
in interfaceServerManagerViewMBean
- Throws:
Exception
- if an error occurs
-
-