org.ow2.jonas.cluster.daemon
Interface ClusterDaemonMBean

All Known Implementing Classes:
ClusterDaemon

public interface ClusterDaemonMBean

Author:
eyindanga

Method Summary
 void addServer(String name, String description, String jonasRoot, String jonasBase, String javaHome, String xprm, String autoBoot, String jonasCmd, String saveIt)
          Add a server configuration.
 boolean checkServerState(String srvName)
          Retrieve the state of the given controlled server.
 String getAutoBoot4Server(String name)
          True if autoboot is enabled for the given server.
 ArrayList getControlledServersNames()
          Controlled servers.
 Hashtable<String,String> getDynamicHostAttributes()
          Get dynamic host attributes.
 String getJavaHome4Server(String name)
           
 String getJmxUrl()
          Get jmx url of the cluster daemon.
 String getJonasBase4Server(String name)
          Get JONAS_BASE for the given server.
 String getJonasCmd4Server(String name)
          Get command for the given server.
 String getJonasRoot4Server(String name)
          get JONAS_ROOT for the given server.
 String getobjectName()
           
 String getOperatingSystemArch()
          get OS architecture.
 String getOperatingSystemAvailableProcessors()
          Get available processors of the OS.
 String getOperatingSystemName()
          Get OS name.
 String getOperatingSystemVersion()
          Get OS version.
 String getOsCurrentUsedSpace()
          Getting Operating system Current used space.
 String getOsTotalSpace()
          Getting Operating system Current used space.
 String getRunTimeSpecVendor()
          Get spec.
 String getRunTimeSpecVersion()
          Get runtime spec.
 String getRunTimeVmName()
          Get runtime vm name.
 String getRunTimeVmVendor()
          Get runtime vendor.
 String getRunTimeVmVersion()
          Get runtime vm version.
 String getVmCurrentUsedHeapMemory()
          Getting remote Vm's Current used Heap memory.
 String getVmCurrentUsedMemory()
          Get remote Vm used Memory.
 String getVmCurrentUsedNonHeapMemory()
          Getting remote Vm's Current used non Heap memory.
 String getVmTotalMemory()
          Getting remote Vm Total Memory.
 String getXprm4Server(String name)
          Get extra parameters for the given server.
 void haltJOnAS(String name)
          Halt a JOnAS instance.
 boolean iseventProvider()
           
 boolean isstateManageable()
           
 boolean isstatisticsProvider()
           
 void modifyServer(String name, String description, String javaHome, String jonasRoot, String jonasBase, String xprm, String autoBoot, String jonasCmd)
          Modify a server configuration.
 int pingJOnAS(String name)
          Ping a JOnAS instance (MBean interface).
 void reloadConfiguration()
          Reload the configuration.
 void removeServer(String serverName)
          Remove this server from cluster daemon control.
 void removeServer(String serverName, String saveIt)
          Remove this server from cluster daemon control.
 void saveConfiguration()
          Save the configuration.
 ArrayList serversNames()
           
 void setobjectName(String name)
          Sets the object name of this mbean
 String startAllJOnAS(String domainName, String prm)
          Start all the JOnAS instances configured with auto-reboot.
 void startJOnAS(String name, String domainName, String prm)
          Start a JOnAS instance.
 String stopAllJOnAS()
          Stop all the JOnAS instances.
 void stopClusterDaemon()
          Stop the cluster daemon instance.
 void stopJOnAS(String name)
          Stop a JOnAS instance.
 

Method Detail

getobjectName

String getobjectName()
                     throws ClusterDaemonException
Returns:
Object Name
Throws:
ClusterDaemonException

setobjectName

void setobjectName(String name)
                   throws ClusterDaemonException
Sets the object name of this mbean

Parameters:
name - the Object Name
Throws:
ClusterDaemonException - any.

iseventProvider

boolean iseventProvider()
                        throws ClusterDaemonException
Returns:
true if it is an event provider
Throws:
ClusterDaemonException - any.

isstateManageable

boolean isstateManageable()
                          throws ClusterDaemonException
Returns:
true if this managed object implements J2EE State Management Model
Throws:
ClusterDaemonException - any.

isstatisticsProvider

boolean isstatisticsProvider()
                             throws ClusterDaemonException
Returns:
true if this managed object implements the J2EE StatisticProvider Model
Throws:
ClusterDaemonException - any.

serversNames

ArrayList serversNames()
                       throws ClusterDaemonException
Returns:
list of controlled servers.
Throws:
ClusterDaemonException

getControlledServersNames

ArrayList getControlledServersNames()
                                    throws ClusterDaemonException
Controlled servers.

Returns:
cluster daemon controlled server names.
Throws:
ClusterDaemonException

getJavaHome4Server

String getJavaHome4Server(String name)
                          throws ClusterDaemonException
Parameters:
name - JOnAS instance name
Returns:
the JAVA_HOME for a specified server name.
Throws:
ClusterDaemonException - any.

getJonasRoot4Server

String getJonasRoot4Server(String name)
                           throws ClusterDaemonException
get JONAS_ROOT for the given server.

Parameters:
name - JOnAS instance name
Returns:
the JONAS_ROOT for a specified server name
Throws:
ClusterDaemonException - any.

getJonasBase4Server

String getJonasBase4Server(String name)
                           throws ClusterDaemonException
Get JONAS_BASE for the given server.

Parameters:
name - JOnAS instance name
Returns:
the JONAS_BASE for a specified server name.
Throws:
ClusterDaemonException - any.

getJonasCmd4Server

String getJonasCmd4Server(String name)
                          throws ClusterDaemonException
Get command for the given server.

Parameters:
name - JOnAS instance name
Returns:
the user command for a specified server name
Throws:
ClusterDaemonException - any.

getXprm4Server

String getXprm4Server(String name)
                      throws ClusterDaemonException
Get extra parameters for the given server.

Parameters:
name - JOnAS instance name
Returns:
xprm for a specified server name
Throws:
ClusterDaemonException - any.

getAutoBoot4Server

String getAutoBoot4Server(String name)
                          throws ClusterDaemonException
True if autoboot is enabled for the given server.

Parameters:
name - JOnAS instance name
Returns:
autoBoot value for a specified server name
Throws:
ClusterDaemonException

reloadConfiguration

void reloadConfiguration()
                         throws ClusterDaemonException
Reload the configuration.

Throws:
ClusterDaemonException - if an error occurs

addServer

void addServer(String name,
               String description,
               String jonasRoot,
               String jonasBase,
               String javaHome,
               String xprm,
               String autoBoot,
               String jonasCmd,
               String saveIt)
               throws ClusterDaemonException
Add a server configuration.

Parameters:
name - server name
description - server description
javaHome - JAVA_HOME dir
jonasBase - JONAS_BASE dir
jonasRoot - JONAS_ROOT dir
xprm - extra JVM parameters
autoBoot - automatic start
jonasCmd - user command
Throws:
ClusterDaemonException - if an error occurs

modifyServer

void modifyServer(String name,
                  String description,
                  String javaHome,
                  String jonasRoot,
                  String jonasBase,
                  String xprm,
                  String autoBoot,
                  String jonasCmd)
                  throws ClusterDaemonException
Modify a server configuration.

Parameters:
name - server name
description - server description
javaHome - JAVA_HOME dir
jonasBase - JONAS_BASE dir
jonasRoot - JONAS_ROOT dir
xprm - extra JVM parameters
autoBoot - automatic start
jonasCmd - user command
Throws:
ClusterDaemonException - if an error occurs

removeServer

void removeServer(String serverName,
                  String saveIt)
                  throws ClusterDaemonException
Remove this server from cluster daemon control.

Parameters:
serverName - the server to remove
saveIt - if true then flush the configuration
Throws:
ClusterDaemonException

saveConfiguration

void saveConfiguration()
                       throws ClusterDaemonException
Save the configuration.

Throws:
ClusterDaemonException - any.

removeServer

void removeServer(String serverName)
                  throws ClusterDaemonException
Remove this server from cluster daemon control.

Parameters:
serverName - the server to remove
Throws:
ClusterDaemonException

startJOnAS

void startJOnAS(String name,
                String domainName,
                String prm)
                throws ClusterDaemonException
Start a JOnAS instance.

Parameters:
name - instance name
domainName - domain name
prm - extra parameters
Throws:
ClusterDaemonException - if an error occurs

stopJOnAS

void stopJOnAS(String name)
               throws ClusterDaemonException
Stop a JOnAS instance.

Parameters:
name - instance name
Throws:
ClusterDaemonException - if an error occurs

haltJOnAS

void haltJOnAS(String name)
               throws ClusterDaemonException
Halt a JOnAS instance.

Parameters:
name - instance name
Throws:
ClusterDaemonException - if an error occurs

pingJOnAS

int pingJOnAS(String name)
              throws ClusterDaemonException
Ping a JOnAS instance (MBean interface).

Parameters:
name - instance name
Returns:
exit code of the ping (0 ok, 1 ko)
Throws:
ClusterDaemonException - if an error occurs

startAllJOnAS

String startAllJOnAS(String domainName,
                     String prm)
                     throws ClusterDaemonException
Start all the JOnAS instances configured with auto-reboot.

Parameters:
domainName - domain name
prm - extra parameters
Returns:
the nodes list with an indicator started/starting failed
Throws:
ClusterDaemonException

stopAllJOnAS

String stopAllJOnAS()
                    throws ClusterDaemonException
Stop all the JOnAS instances.

Returns:
the nodes list with an indicator stopped/stopping failed
Throws:
ClusterDaemonException - any.

stopClusterDaemon

void stopClusterDaemon()
                       throws ClusterDaemonException
Stop the cluster daemon instance.

Throws:
ClusterDaemonException - any.

getJmxUrl

String getJmxUrl()
                 throws ClusterDaemonException
Get jmx url of the cluster daemon.

Returns:
clusterd jmx url
Throws:
ClusterDaemonException

getOperatingSystemAvailableProcessors

String getOperatingSystemAvailableProcessors()
                                             throws ClusterDaemonException
Get available processors of the OS.

Returns:
Operating system processors number
Throws:
ClusterDaemonException

getOperatingSystemName

String getOperatingSystemName()
                              throws ClusterDaemonException
Get OS name.

Returns:
OS name
Throws:
ClusterDaemonException - any.

getOperatingSystemArch

String getOperatingSystemArch()
                              throws ClusterDaemonException
get OS architecture.

Returns:
Os architecture
Throws:
ClusterDaemonException - any.

getOperatingSystemVersion

String getOperatingSystemVersion()
                                 throws ClusterDaemonException
Get OS version.

Returns:
OS version
Throws:
ClusterDaemonException - any.

getRunTimeSpecVendor

String getRunTimeSpecVendor()
                            throws ClusterDaemonException
Get spec. vendor.

Returns:
Spec vendor
Throws:
ClusterDaemonException - any.

getRunTimeSpecVersion

String getRunTimeSpecVersion()
                             throws ClusterDaemonException
Get runtime spec. version.

Returns:
Spec version
Throws:
ClusterDaemonException - any.

getRunTimeVmName

String getRunTimeVmName()
                        throws ClusterDaemonException
Get runtime vm name.

Returns:
the Vm name
Throws:
ClusterDaemonException - any.

getRunTimeVmVendor

String getRunTimeVmVendor()
                          throws ClusterDaemonException
Get runtime vendor.

Returns:
Vm vendor
Throws:
ClusterDaemonException - any.

getRunTimeVmVersion

String getRunTimeVmVersion()
                           throws ClusterDaemonException
Get runtime vm version.

Returns:
Vm version
Throws:
ClusterDaemonException - any.

getDynamicHostAttributes

Hashtable<String,String> getDynamicHostAttributes()
                                                  throws ClusterDaemonException
Get dynamic host attributes.

Returns:
hashtable with dynamic attributes keys and values.
Throws:
ClusterDaemonException - any.

checkServerState

boolean checkServerState(String srvName)
                         throws ClusterDaemonException
Retrieve the state of the given controlled server.

Parameters:
srvName - server's name.
Returns:
true if the server is running
Throws:
ClusterDaemonException - any.

getVmCurrentUsedMemory

String getVmCurrentUsedMemory()
                              throws ClusterDaemonException
Get remote Vm used Memory.

Returns:
the value of current used memory
Throws:
ClusterDaemonException - any.

getVmTotalMemory

String getVmTotalMemory()
                        throws ClusterDaemonException
Getting remote Vm Total Memory.

Returns:
the value of Vm Total memory
Throws:
ClusterDaemonException - any.

getVmCurrentUsedHeapMemory

String getVmCurrentUsedHeapMemory()
                                  throws ClusterDaemonException
Getting remote Vm's Current used Heap memory.

Returns:
the value of Vm's Current used Heap memory
Throws:
ClusterDaemonException - any.

getVmCurrentUsedNonHeapMemory

String getVmCurrentUsedNonHeapMemory()
                                     throws ClusterDaemonException
Getting remote Vm's Current used non Heap memory.

Returns:
the value of Vm's Current used non Heap memory
Throws:
ClusterDaemonException - any.

getOsCurrentUsedSpace

String getOsCurrentUsedSpace()
                             throws ClusterDaemonException
Getting Operating system Current used space.

Returns:
the value of Operating system Current used space
Throws:
ClusterDaemonException - any.

getOsTotalSpace

String getOsTotalSpace()
                       throws ClusterDaemonException
Getting Operating system Current used space.

Returns:
the value of Operating system Total space
Throws:
ClusterDaemonException - any.


Copyright © 2010 OW2 Consortium. All Rights Reserved.