org.wso2.wsas.admin.service
Interface ServerAdminMBean

All Known Implementing Classes:
ServerAdmin

public interface ServerAdminMBean

MBean interface for exposing Server Adminstration functionalities


Method Summary
 void endMaintenance()
          Method to change the state of a node from "maintenance" to "normal"
 java.lang.String getServerDataAsString()
          Get information about this WSAS instance
 java.lang.String getServerStatus()
          Get the current status of this WSAS instance
 java.lang.String getServerVersion()
          Get the version of this WSAS instance
 boolean isAlive()
          Method to check whether this WSAS instance is alive
 void restart()
          Forcefully restart this WSAS instance
 void restartGracefully()
          Gracefully restart this WSAS instance.
 void shutdown()
          Forcefully shutdown this WSAS instance
 void shutdownGracefully()
          Gracefully shutdown this WSAS instance All client connections will be served before shutting down the server
 void startMaintenance()
          Method to switch a node to maintenance mode.
 

Method Detail

restart

void restart()
             throws java.lang.Exception
Forcefully restart this WSAS instance

Throws:
java.lang.Exception - If an error occurs while restarting

shutdown

void shutdown()
              throws java.lang.Exception
Forcefully shutdown this WSAS instance

Throws:
java.lang.Exception - If an error occurs while shutting down

restartGracefully

void restartGracefully()
                       throws java.lang.Exception
Gracefully restart this WSAS instance. All client connections will be served before restarting the server

Throws:
java.lang.Exception - If an error occurs while restarting

shutdownGracefully

void shutdownGracefully()
                        throws java.lang.Exception
Gracefully shutdown this WSAS instance All client connections will be served before shutting down the server

Throws:
java.lang.Exception - If an error occurs while shutting down

startMaintenance

void startMaintenance()
                      throws java.lang.Exception
Method 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 & connections can be served
  • Once all requests have been processed, the method returns
  • Throws:
    java.lang.Exception - If an error occurred while switching to maintenace mode

    endMaintenance

    void endMaintenance()
                        throws java.lang.Exception
    Method to change the state of a node from "maintenance" to "normal"

    Throws:
    java.lang.Exception - If an error occurred while switching to normal mode

    getServerDataAsString

    java.lang.String getServerDataAsString()
                                           throws java.lang.Exception
    Get information about this WSAS instance

    Returns:
    The server information as a string
    Throws:
    java.lang.Exception - If an error occurred while retrieving server information

    getServerVersion

    java.lang.String getServerVersion()
    Get the version of this WSAS instance

    Returns:
    The version of this WSAS instance

    isAlive

    boolean isAlive()
    Method to check whether this WSAS instance is alive

    Returns:
    True always

    getServerStatus

    java.lang.String getServerStatus()
                                     throws java.lang.Exception
    Get the current status of this WSAS instance

    Returns:
    The current server status.
    Possible values are,
    org.wso2.wsas.ServerStatus#RUNNING,
    org.wso2.wsas.ServerStatus#SHUTTING_DOWN,
    org.wso2.wsas.ServerStatus#RESTARTING,
    org.wso2.wsas.ServerStatus#IN_MAINTENANCE
    Throws:
    java.lang.Exception
    See Also:
    ServerStatus