Class ServerAdmin
java.lang.Object
org.wso2.carbon.core.AbstractAdmin
org.wso2.carbon.server.admin.service.ServerAdmin
- All Implemented Interfaces:
org.wso2.carbon.server.admin.common.IServerAdmin,ServerAdminMBean
@Capability(namespace="osgi.service",
attribute={"objectClass=org.wso2.carbon.server.admin.common.IServerAdmin","service.scope=singleton"})
public class ServerAdmin
extends org.wso2.carbon.core.AbstractAdmin
implements ServerAdminMBean, org.wso2.carbon.server.admin.common.IServerAdmin
Admin service to manage server related operations
-
Field Summary
Fields inherited from class org.wso2.carbon.core.AbstractAdmin
axisConfig, configurationContext -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidMethod to change the state of a node from "maintenance" to "normal"org.wso2.carbon.server.admin.common.ServerDataGet information about this WSAS instanceGet the current status of this WSAS instanceGet the version of this WSAS instancebooleanisAlive()Method to check whether this WSAS instance is alivebooleanrestart()Forcefully restart this WSAS instancebooleanGracefully restart this WSAS instance.booleanshutdown()Forcefully shutdown this WSAS instancebooleanGracefully shutdown this WSAS instance All client connections will be served before shutting down the servervoidMethod to switch a node to maintenance mode.Methods inherited from class org.wso2.carbon.core.AbstractAdmin
getAxisConfig, getConfigContext, getConfigSystemRegistry, getConfigUserRegistry, getGovernanceRegistry, getGovernanceSystemRegistry, getGovernanceUserRegistry, getHttpSession, getLocalRepo, getRegistry, getTenantDomain, getUserId, getUsername, getUserRealm, setConfigurationContext, setPermissionUpdateTimestamp
-
Constructor Details
-
ServerAdmin
public ServerAdmin()
-
-
Method Details
-
getServerData
- Specified by:
getServerDatain interfaceorg.wso2.carbon.server.admin.common.IServerAdmin- Throws:
Exception
-
getServerDataAsString
Description copied from interface:ServerAdminMBeanGet information about this WSAS instance- Specified by:
getServerDataAsStringin interfaceServerAdminMBean- Returns:
- The server information as a string
- Throws:
Exception- If an error occurred while retrieving server information
-
getServerVersion
Description copied from interface:ServerAdminMBeanGet the version of this WSAS instance- Specified by:
getServerVersionin interfaceServerAdminMBean- Returns:
- The version of this WSAS instance
-
restart
Description copied from interface:ServerAdminMBeanForcefully restart this WSAS instance- Specified by:
restartin interfaceorg.wso2.carbon.server.admin.common.IServerAdmin- Specified by:
restartin interfaceServerAdminMBean- Returns:
- true - If successful, false otherwise
- Throws:
Exception- If an error occurs while restarting
-
restartGracefully
Description copied from interface:ServerAdminMBeanGracefully restart this WSAS instance. All client connections will be served before restarting the server- Specified by:
restartGracefullyin interfaceorg.wso2.carbon.server.admin.common.IServerAdmin- Specified by:
restartGracefullyin interfaceServerAdminMBean- Returns:
- true - If successful, false otherwise
- Throws:
Exception- If an error occurs while restarting
-
shutdown
public boolean shutdown() throws org.apache.axis2.AxisFaultDescription copied from interface:ServerAdminMBeanForcefully shutdown this WSAS instance- Specified by:
shutdownin interfaceorg.wso2.carbon.server.admin.common.IServerAdmin- Specified by:
shutdownin interfaceServerAdminMBean- Returns:
- true - If successful, false otherwise
- Throws:
org.apache.axis2.AxisFault
-
shutdownGracefully
public boolean shutdownGracefully() throws org.apache.axis2.AxisFaultDescription copied from interface:ServerAdminMBeanGracefully shutdown this WSAS instance All client connections will be served before shutting down the server- Specified by:
shutdownGracefullyin interfaceorg.wso2.carbon.server.admin.common.IServerAdmin- Specified by:
shutdownGracefullyin interfaceServerAdminMBean- Returns:
- true - If successful, false otherwise
- Throws:
org.apache.axis2.AxisFault
-
startMaintenance
Description copied from interface:ServerAdminMBeanMethod to switch a node to maintenance mode. Here is the sequence of events:- Client calls this method
- The server stops accepting new requests/connections, but continues to stay alive so that old requests invalid input: '&' connections can be served
- Once all requests have been processed, the method returnsinvalid input: '<'/li
- Specified by:
startMaintenancein interfaceServerAdminMBean- Throws:
Exception- If an error occurred while switching to maintenace mode
-
endMaintenance
Description copied from interface:ServerAdminMBeanMethod to change the state of a node from "maintenance" to "normal"- Specified by:
endMaintenancein interfaceServerAdminMBean- Throws:
Exception- If an error occurred while switching to normal mode
-
isAlive
public boolean isAlive()Description copied from interface:ServerAdminMBeanMethod to check whether this WSAS instance is alive- Specified by:
isAlivein interfaceServerAdminMBean- Returns:
- True always
-
getServerStatus
Description copied from interface:ServerAdminMBeanGet the current status of this WSAS instance- Specified by:
getServerStatusin interfaceServerAdminMBean- Returns:
- The current server status.
Possible values are,
ServerStatus.STATUS_RUNNING,
ServerStatus.STATUS_SHUTTING_DOWN,
ServerStatus.STATUS_RESTARTING,
ServerStatus.STATUS_IN_MAINTENANCE - Throws:
Exception- If an error occurs while retrieving the status- See Also:
-