org.wso2.carbon.server.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"
 String getServerDataAsString()
          Get information about this WSAS instance
 String getServerStatus()
          Get the current status of this WSAS instance
 String getServerVersion()
          Get the version of this WSAS instance
 boolean isAlive()
          Method to check whether this WSAS instance is alive
 boolean restart()
          Forcefully restart this WSAS instance
 boolean restartGracefully()
          Gracefully restart this WSAS instance.
 boolean shutdown()
          Forcefully shutdown this WSAS instance
 boolean 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

boolean restart()
                throws Exception
Forcefully restart this WSAS instance

Returns:
true - If successful, false otherwise
Throws:
Exception - If an error occurs while restarting

shutdown

boolean shutdown()
                 throws Exception
Forcefully shutdown this WSAS instance

Returns:
true - If successful, false otherwise
Throws:
Exception - If an error occurs while shutting down

restartGracefully

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

Returns:
true - If successful, false otherwise
Throws:
Exception - If an error occurs while restarting

shutdownGracefully

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

Returns:
true - If successful, false otherwise
Throws:
Exception - If an error occurs while shutting down

startMaintenance

void startMaintenance()
                      throws 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:
    Exception - If an error occurred while switching to maintenace mode

    endMaintenance

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

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

    getServerDataAsString

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

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

    getServerVersion

    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

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

    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:
    ServerStatus


    Copyright © 2014 WSO2 Inc. All rights reserved.