org.ow2.jonas.lib.management.extensions.manager
Class ManagementEntryPoint

java.lang.Object
  extended by org.ow2.jonas.lib.management.extensions.manager.ManagementEntryPoint
All Implemented Interfaces:
Serializable, IBaseManagement, ICluster, IClusterdaemon, IDomain, IServer, IServerManagement

public final class ManagementEntryPoint
extends Object
implements IDomain, IServer, IServerManagement, IClusterdaemon, ICluster, Serializable

Implements singleton for all management operations in JOnAS.

Author:
danesa, Oualaa Hani, Thomas KOUASSI
See Also:
Serialized Form

Method Summary
 void addCluster(String clusterName)
          Add a new cluster in the domain.
 void addServer(String serverName, String serverURL, String userName, String password, String clusterdaemon)
          Add a new server in the domain.
 void addServer(String clusterDaemonName, String serverName, String description, String jonasRoot, String jonasBase, String javaHome, String xprem, String autoBoot, String jonasCmd, String saveIt)
          Add a server to cluster daemon control
 void addServerToCluster(String clusterName, String serverName, String clusterDaemon, String serverURL)
          Add server to cluster.
 void deploy(String fileName, String serverName)
          Deploy a module on a target server in the domain.
 boolean developmentMode(String serviceName, String serverName)
          Return true if a given service is in 'development' mode for a given server managed in the domain.
 int getAllThreadsCount(String server)
          Get the number of threads used by a server in the domain.
 Object getAttribute(ObjectName on, String attribute, String serverName)
          Gets the value of a specific attribute of a named MBean.
 J2EEMBeanAttributeInfo[] getAttributes(ObjectName objectName, String serverName)
          Get management attributes.
 String getAutoBoot(String server)
          Get the Auto Boot
 long getBytesReceivedByConnectorTomcat(String server)
           
 long getBytesSentByConnectorTomcat(String server)
           
 String[] getClusterDaemonNames()
           
 String[] getclusterDaemons()
          Return the clusterDaemons in the domain.
 String getClusterdaemonState(String clusterdaemonName)
           
 String[] getClusters()
          Return the clusters in the domain.
 String[] getClustersNames()
           
 String getClusterState(String clusterName)
          Return the state of a cluster in the domain.
 String getClusterType(String clusterName)
          Return the type of a cluster in the current domain.
 String getConnectionUrl(String server)
          Get the JMX connection URL of the server.
 String[] getControlledServersNames(String clusterdaemonName)
           
 int getCurrentNumberOfEJB(String server)
           
 int getCurrentNumberOfEntityBean(String server)
           
 int getCurrentNumberOfMDB(String server)
           
 int getCurrentNumberOfSBF(String server)
           
 int getCurrentNumberOfSBL(String server)
           
 int getCurrentThreadBusyByConnectorTomcat(String server)
           
 int getCurrentThreadCountByConnectorTomcat(String server)
           
 Long getCurrentTotalMemory(String server)
          Get the total memory of the server in the domain.
 long getCurrentUsedMemory(String server)
          Get the memory used by a server in the domain.
 int getDelayToRefresh(String clusterName)
           
 String getDescription(String server)
          Get the Description
 String getDomainName()
          Get the domain name.
 int getErrorCountByConnectorTomcat(String server)
           
 String getHostName(String serverName)
           
static ManagementEntryPoint getInstance()
           
 int getIntegerAttribute(ObjectName objectName, String attrName)
          Get the integer attribute value of an MBean in the current MBean Server.
 String getJavaHome(String serverName)
          Get the Java home
 String getJavaVendor(String server)
          Get the JVM vendor.
 String getJavaVersion(String server)
          Get the java version.
 String getJonasBase(String server)
          Get the Jonas Base
 String getJonasRoot(String server)
          Get the Jonas Root
 String getKeyValue(String objectName, String keyName)
          Return the value of a key property in an OBJECT_NAME.
 String[] getKeyValues(String[] objectNames, String keyName)
          Return the values of a key property in String OBJECT_NAMEs.
 List getListMbean(ObjectName on, String serverName)
          Return the list of ObjectName Mbean gotten by the query in the current MbeanServer.
 int getMaxThreadsByConnectorTomcat(String server)
           
 String getMcastAddr(String clusterName)
           
 int getMcastPort(String clusterName)
           
 String getOperatingSystemArch(String clusterDaemonName)
          Get the OperatingSystemArch a cluster Daemon Name in the domain.
 String getOperatingSystemAvailableProcessors(String clusterDaemonName)
          Get the OperatingSystemAvailableProcessorsof a cluster Daemon Name in the domain.
 String getOperatingSystemName(String clusterDaemonName)
          Get the OperatingSystemName a cluster Daemon Name in the domain.
 String getOperatingSystemVersion(String clusterDaemonName)
          Get the OperatingSystemVersion a cluster Daemon Name in the domain.
 String getOsCurrentUsedSpace(String clusterDaemonName)
          Getting Operating system Current used space
 String getOsTotalSpace(String clusterDaemonName)
          Getting Operating system Total space
 long getProcessingTimeByConnectorTomcat(String server)
           
 String getProtocols(String server)
          Get the the protocols used bye the server.
 List<?> getRealmItems(String realmType, String securityRealmUsed)
          Get realm items of the given type within the current server of the current domain.
 List<?> getRealmItems(String realmType, String securityRealmUsed, String domainName, String serverName)
          Get realm items of the given type.
 int getRequestCountByConnectorTomcat(String server)
           
 String getRunTimeSpecVendor(String clusterDaemonName)
          Get the RunTimeSpecVendor a cluster Daemon Name in the domain.
 String getRunTimeSpecVersion(String clusterDaemonName)
          Get the RunTimeSpecVersion a cluster Daemon Name in the domain.
 String getRunTimeVmName(String clusterDaemonName)
          Get the RunTimeVmName a cluster Daemon Name in the domain.
 String getRunTimeVmVendor(String clusterDaemonName)
          Get the RunTimeVmVendor a cluster Daemon Name in the domain.
 String getRunTimeVmVersion(String clusterDaemonName)
          Get the RunTimeVmVersion a cluster Daemon Name in the domain.
 String getServerClusterdaemon(String serverName)
          Return the clusterDaemon of a server in the domain.
 MBeanServerConnection getServerConnection()
          Return the MBeanServer connection corresponding to a current server in the current domain.
 MBeanServerConnection getServerConnection(String serverName)
          Return the MBeanServer connection corresponding to a given server in the current domain.
 String getServerHost()
           
 String getServerName()
          Get the name of the server providing the ManagementEntryEndpoint.
 String[] getServerNames()
          Return the server names that are belonging to the domain.
 String[] getServerNames(String clusterName)
           
 String getServerPort()
           
 String[] getServersNotInCluster(String clusterName)
          Get the name of the servers in the domain except the ones that are belonging to this cluster.
 String getServerState(String serverName)
          Return the state of a server in the domain.
 List<List<String>> getServerThreadsInformation(String serverName)
          Get threads information for a given server managed in the domain.
 List<List<String>> getServerThreadsInformation(String jmxUrl, String username, String password)
          Get threads information for a server identified by the a JMX Url.
 String getServerVersion(String server)
          Get the version of a server in the domain.
 String getStringAttribute(ObjectName objectName, String attrName)
          Get the String attribute value of an MBean in the current MBean Server.
 ObjectName getTomcatRealm(String domainName, String serverName)
          Get the ObjectName of the Tomcat Realm MBean.
 List<?> getTomcatRealmItems(String usedSecurityRealm, String domainName, String serverName)
           
 int getTotalBegunTransactions(String server)
           
 int getTotalCommittedTransactions(String server)
           
 int getTotalCurrentTransactions(String server)
           
 int getTotalExpiredTransactions(String server)
           
 int getTotalRolledbackTransactions(String server)
           
 String getVmCurrentUsedHeapMemory(String clusterDaemonName)
          Getting remote Vm's Current used Heap memory
 String getVmCurrentUsedMemory(String clusterDaemonName)
          Get the vmCurrentUsedMemory a cluster Daemon Name in the domain.
 String getVmCurrentUsedNonHeapMemory(String clusterDaemonName)
          Getting remote Vm's Current used non Heap memory
 String getVmTotalMemory(String clusterDaemonName)
          Get the vmTotalMemory a cluster Daemon Name in the domain.
 String getXprem(String server)
          Get the Xprem
 void haltServer(String serverName)
          Halt the server.
 Object invoke(ObjectName on, String operation, Object[] param, String[] signature, String serverName)
          Implementation of the invoke method to be applied to a server in the domain.
 boolean isMaster()
          Return True if the current server is a master.
 boolean isMaster(String serverName)
          Return True if the managed server is a master.
 boolean isRegistered(ObjectName on, String serverName)
          Implementation of the isRegistered method to be applied to a server in the domain.
 boolean isRunning(String clusterdaemonName)
           
 boolean remove(String fileName, String serverName)
          Remove a module on a target server.
 void removeServer(String clusterDaemonName, String serverName, String saveIt)
          Remove this server from cluster daemon control.
 void removeServers(String[] serversToRemove)
          Remove a list of servers from the domain.
 void setAttribute(ObjectName on, String attribute, Object value)
          Sets the value of a specific attribute of a named MBean within the current server.
 void setAttribute(ObjectName on, String attribute, Object value, String serverName)
          Sets the value of a specific attribute of a named MBean.
 void startAllServers(String clusterName)
          start all servers in the cluster.
 void startAllServers(String clusterDaemonName, String otherParams)
          Ask Cluster Daemon to start all the Servers from cluster daemon control.
 void startServer(String serverName)
          Start the server.
 void startServer(String serverName, boolean standby)
          Start the server.
 boolean startServer(String clusterdaemonName, String serverName)
          Start a server controlled by a cluster daemon
 void stopAllServers(String clusterName)
          stop all servers in the cluster.
 void stopAllServers(String clusterDaemonName, String otherParams)
          Ask Cluster Daemon to stop all the Servers from cluster daemon control.
 void stopServer(String serverName)
          Stop the server.
 void stopServer(String serverName, boolean standby)
          Stop the server.
 boolean stopServer(String clusterdaemonName, String serverName)
          Stop a server controlled by a cluster daemon
 void undeploy(String fileName, String serverName)
          Uneploy a module on a target server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static ManagementEntryPoint getInstance()
Returns:
ManagementEntryPoint singleton.

getDomainName

public String getDomainName()
Description copied from interface: IDomain
Get the domain name.

Specified by:
getDomainName in interface IBaseManagement
Specified by:
getDomainName in interface IDomain
Returns:
the current domain name.

getServerName

public String getServerName()
Description copied from interface: IDomain
Get the name of the server providing the ManagementEntryEndpoint.

Specified by:
getServerName in interface IBaseManagement
Specified by:
getServerName in interface IDomain
Returns:
the current server name.

getServerHost

public String getServerHost()
Specified by:
getServerHost in interface IDomain
Returns:
the current server's host.

getServerPort

public String getServerPort()
Specified by:
getServerPort in interface IDomain
Returns:
the current server's port if the web service activated.

isMaster

public boolean isMaster(String serverName)
Return True if the managed server is a master.

Specified by:
isMaster in interface IDomain
Parameters:
serverName - managed server name
Returns:
the "master" attribute of the corresponding J2EEDomain MBean

isMaster

public boolean isMaster()
Return True if the current server is a master.

Specified by:
isMaster in interface IDomain
Returns:
the "master" attribute of the current J2EEDomain MBean

getServerNames

public String[] getServerNames()
Return the server names that are belonging to the domain.

Specified by:
getServerNames in interface IDomain
Returns:
the server names that are belonging to the domain

getClustersNames

public String[] getClustersNames()
Specified by:
getClustersNames in interface IDomain
Returns:
the names of clusters in the domain.

getClusterDaemonNames

public String[] getClusterDaemonNames()
Specified by:
getClusterDaemonNames in interface IDomain
Returns:
the names of clusterDaemons in the domain.

getClusters

public String[] getClusters()
Return the clusters in the domain. A cluster in the domain has associated a cluster MBean having in its ObjectName a key property 'type' with values in {LogicalCluster, TomcatCluster, JkCluster, EjbHa}

Specified by:
getClusters in interface IDomain
Returns:
the OBJECT_NAMES of the Cluster MBeans.

getclusterDaemons

public String[] getclusterDaemons()
Return the clusterDaemons in the domain. A clusterDaemon in the domain has associated a cluster daemon MBean having in its ObjectName a key property 'type' with value equal to 'ClusterDaemon'.

Specified by:
getclusterDaemons in interface IDomain
Returns:
the OBJECT_NAMES of the Cluster Daemon MBeans.

addServer

public void addServer(String serverName,
                      String serverURL,
                      String userName,
                      String password,
                      String clusterdaemon)
Add a new server in the domain.

Specified by:
addServer in interface IDomain
Parameters:
serverName - the server's name.
connector - the server's connector it can be JRMP, IRMI or IIOP.
userName - the user of the new server.
password - the password of the new server.
clusterDaemon - the name of clusterDaemon if this server will take part of clusterDaemon.

removeServers

public void removeServers(String[] serversToRemove)
Remove a list of servers from the domain.

Specified by:
removeServers in interface IDomain
Parameters:
serversToRemove - the list of servers to remove.

addCluster

public void addCluster(String clusterName)
Add a new cluster in the domain.

Specified by:
addCluster in interface IDomain
Parameters:
clusterName - the new cluster's name.

getServerState

public String getServerState(String serverName)
Return the state of a server in the domain.

Specified by:
getServerState in interface IDomain
Parameters:
serverName - the server's name
Returns:
the state of a server in the domain

startServer

public void startServer(String serverName)
Start the server.

Parameters:
serverName - the name of the server to start

startServer

public void startServer(String serverName,
                        boolean standby)
Start the server.

Specified by:
startServer in interface IDomain
Parameters:
serverName - the name of the server to start
standby - true to activate standby mode.

stopServer

public void stopServer(String serverName)
Stop the server.

Parameters:
serverName - the name of the server to stop (stop the JVM)

stopServer

public void stopServer(String serverName,
                       boolean standby)
Stop the server.

Specified by:
stopServer in interface IDomain
Parameters:
serverName - the name of the server to stop
standby -

haltServer

public void haltServer(String serverName)
Halt the server.

Parameters:
serverName - the name of the server to halt

getServerClusterdaemon

public String getServerClusterdaemon(String serverName)
Return the clusterDaemon of a server in the domain.

Specified by:
getServerClusterdaemon in interface IDomain
Parameters:
serverName - the server's name
Returns:
the name of the server's cluster daemon

getClusterState

public String getClusterState(String clusterName)
Return the state of a cluster in the domain.

Specified by:
getClusterState in interface IDomain
Parameters:
clusterName - the cluster's name
Returns:
the state of a cluster in the domain

getClusterType

public String getClusterType(String clusterName)
Return the type of a cluster in the current domain.

Specified by:
getClusterType in interface IDomain
Parameters:
clusterName - the cluster's name
Returns:
the result of the getClusterType operation

getServerNames

public String[] getServerNames(String clusterName)
Specified by:
getServerNames in interface IDomain
Parameters:
clusterName - the cluster name
Returns:
the server names that are belonging to a cluster

getJavaHome

public String getJavaHome(String serverName)
Get the Java home

Specified by:
getJavaHome in interface IServer
Parameters:
server - the server's name.
Returns:
the javaHome

getCurrentUsedMemory

public long getCurrentUsedMemory(String server)
Get the memory used by a server in the domain.

Specified by:
getCurrentUsedMemory in interface IServer
Parameters:
server - the server's name.
Returns:
the used memory

getServerVersion

public String getServerVersion(String server)
Get the version of a server in the domain.

Specified by:
getServerVersion in interface IServer
Parameters:
server - the server's name.
Returns:
the server's version

getAllThreadsCount

public int getAllThreadsCount(String server)
Get the number of threads used by a server in the domain.

Specified by:
getAllThreadsCount in interface IServer
Parameters:
server - the server's name.
Returns:
the number of threads

getCurrentTotalMemory

public Long getCurrentTotalMemory(String server)
Get the total memory of the server in the domain.

Specified by:
getCurrentTotalMemory in interface IServer
Parameters:
server - the server's name.
Returns:
the total memory

getConnectionUrl

public String getConnectionUrl(String server)
Get the JMX connection URL of the server.

Specified by:
getConnectionUrl in interface IServer
Parameters:
server - the server's name.
Returns:
the JMX connection URL of the server

getJonasBase

public String getJonasBase(String server)
Get the Jonas Base

Specified by:
getJonasBase in interface IServer
Parameters:
server - the server's name.
Returns:
the Jonas Base

getJonasRoot

public String getJonasRoot(String server)
Get the Jonas Root

Specified by:
getJonasRoot in interface IServer
Parameters:
server - the server's name.
Returns:
the Jonas Root

getXprem

public String getXprem(String server)
Get the Xprem

Specified by:
getXprem in interface IServer
Parameters:
server - the server's name.
Returns:
the xprem

getDescription

public String getDescription(String server)
Get the Description

Specified by:
getDescription in interface IServer
Parameters:
server - the server's name.
Returns:
the description

getAutoBoot

public String getAutoBoot(String server)
Get the Auto Boot

Specified by:
getAutoBoot in interface IServer
Parameters:
server - the server's name.
Returns:
the autoBoot

getJavaVendor

public String getJavaVendor(String server)
Get the JVM vendor.

Specified by:
getJavaVendor in interface IServer
Parameters:
server - the server's name.
Returns:
the JVM vendor

getJavaVersion

public String getJavaVersion(String server)
Get the java version.

Specified by:
getJavaVersion in interface IServer
Parameters:
server - the server's name.
Returns:
the java version

getProtocols

public String getProtocols(String server)
Get the the protocols used bye the server.

Specified by:
getProtocols in interface IServer
Parameters:
server - the server's name.
Returns:
the protocols used bye the server

getTotalBegunTransactions

public int getTotalBegunTransactions(String server)
Specified by:
getTotalBegunTransactions in interface IServer
Parameters:
server - Server name
Returns:
total begun transactions.

getTotalCommittedTransactions

public int getTotalCommittedTransactions(String server)
Specified by:
getTotalCommittedTransactions in interface IServer
Parameters:
server - Server name
Returns:
total commited transactions.

getTotalExpiredTransactions

public int getTotalExpiredTransactions(String server)
Specified by:
getTotalExpiredTransactions in interface IServer
Parameters:
server - Server name
Returns:
total expired transactions.

getTotalRolledbackTransactions

public int getTotalRolledbackTransactions(String server)
Specified by:
getTotalRolledbackTransactions in interface IServer
Parameters:
server - Server name
Returns:
total global transactions.

getTotalCurrentTransactions

public int getTotalCurrentTransactions(String server)
Specified by:
getTotalCurrentTransactions in interface IServer
Parameters:
server - Server name
Returns:
total current transactions.

getBytesReceivedByConnectorTomcat

public long getBytesReceivedByConnectorTomcat(String server)
Specified by:
getBytesReceivedByConnectorTomcat in interface IServer
Parameters:
server - Server name
Returns:
bytes received by connector tomcat.

getBytesSentByConnectorTomcat

public long getBytesSentByConnectorTomcat(String server)
Specified by:
getBytesSentByConnectorTomcat in interface IServer
Parameters:
server - Server name
Returns:
bytes sent by connector tomcat.

getCurrentThreadBusyByConnectorTomcat

public int getCurrentThreadBusyByConnectorTomcat(String server)
Specified by:
getCurrentThreadBusyByConnectorTomcat in interface IServer
Parameters:
server - Server name
Returns:
current threads busy by connector tomcat.

getCurrentThreadCountByConnectorTomcat

public int getCurrentThreadCountByConnectorTomcat(String server)
Specified by:
getCurrentThreadCountByConnectorTomcat in interface IServer
Parameters:
server - Server name
Returns:
current threads busy by connector tomcat.

getErrorCountByConnectorTomcat

public int getErrorCountByConnectorTomcat(String server)
Specified by:
getErrorCountByConnectorTomcat in interface IServer
Parameters:
server - Server name
Returns:
error count by connector tomcat.

getHostName

public String getHostName(String serverName)
Specified by:
getHostName in interface IServer
Parameters:
server - Server name.
Returns:
host name

getMaxThreadsByConnectorTomcat

public int getMaxThreadsByConnectorTomcat(String server)
Specified by:
getMaxThreadsByConnectorTomcat in interface IServer
Parameters:
server - Server name
Returns:
the max threads by connector tomcat.

getProcessingTimeByConnectorTomcat

public long getProcessingTimeByConnectorTomcat(String server)
Specified by:
getProcessingTimeByConnectorTomcat in interface IServer
Parameters:
server - Server name
Returns:
processing time by connector tomcat.

getRequestCountByConnectorTomcat

public int getRequestCountByConnectorTomcat(String server)
Specified by:
getRequestCountByConnectorTomcat in interface IServer
Parameters:
server - Server name
Returns:
request count by connector tomcat.

getCurrentNumberOfEJB

public int getCurrentNumberOfEJB(String server)
Specified by:
getCurrentNumberOfEJB in interface IServer
Parameters:
server - Server name
Returns:
current number of EJB.

getCurrentNumberOfEntityBean

public int getCurrentNumberOfEntityBean(String server)
Specified by:
getCurrentNumberOfEntityBean in interface IServer
Parameters:
server - Server name
Returns:
current number of Entity bean.

getCurrentNumberOfMDB

public int getCurrentNumberOfMDB(String server)
Specified by:
getCurrentNumberOfMDB in interface IServer
Parameters:
server - Server name
Returns:
current number of mbean.

getCurrentNumberOfSBF

public int getCurrentNumberOfSBF(String server)
Specified by:
getCurrentNumberOfSBF in interface IServer
Parameters:
server - Server name
Returns:
current number of state full bean.

getCurrentNumberOfSBL

public int getCurrentNumberOfSBL(String server)
Specified by:
getCurrentNumberOfSBL in interface IServer
Parameters:
server - Server name
Returns:
current number of state less bean.

getControlledServersNames

public String[] getControlledServersNames(String clusterdaemonName)
Specified by:
getControlledServersNames in interface IClusterdaemon
Parameters:
clusterdaemonName - name
Returns:
list of servers controlled by a cluster daemon

isRunning

public boolean isRunning(String clusterdaemonName)
Specified by:
isRunning in interface IClusterdaemon
Parameters:
clusterdaemonName - name of the cluster daemon to manage.
Returns:
true if the cluster daemon is in RUNNING state, false otherwise

getClusterdaemonState

public String getClusterdaemonState(String clusterdaemonName)
Specified by:
getClusterdaemonState in interface IClusterdaemon
Specified by:
getClusterdaemonState in interface IDomain
Parameters:
clusterdaemonName - name of the cluster daemon to manage
Returns:
the state of a cluster daemon in the domain

startServer

public boolean startServer(String clusterdaemonName,
                           String serverName)
Start a server controlled by a cluster daemon

Specified by:
startServer in interface IClusterdaemon
Parameters:
clusterdaemonName - name of the cluster daemon
serverName - name of the server to start
Returns:
true if successfully started

stopServer

public boolean stopServer(String clusterdaemonName,
                          String serverName)
Stop a server controlled by a cluster daemon

Specified by:
stopServer in interface IClusterdaemon
Parameters:
clusterdaemonName - name of the cluster daemon
serverName - name of the server to stop
Returns:
true if successfully stopped

addServer

public void addServer(String clusterDaemonName,
                      String serverName,
                      String description,
                      String jonasRoot,
                      String jonasBase,
                      String javaHome,
                      String xprem,
                      String autoBoot,
                      String jonasCmd,
                      String saveIt)
Add a server to cluster daemon control

Specified by:
addServer in interface IClusterdaemon
Parameters:
clusterDaemonName - the cluster Daemon name
serverName - the server name
description - server description
javaHome - path to JRE
jonasRoot - path to bin repository
jonasBase - path to lib repository
xprem - extra parameter e.g: -Djava.net.preferIPv4Stack=true
autoBoot - true if the server is launched when cluster daemon starts
jonasCmd - user command
saveIt - true to flush the clusterd configuration

getOperatingSystemAvailableProcessors

public String getOperatingSystemAvailableProcessors(String clusterDaemonName)
Get the OperatingSystemAvailableProcessorsof a cluster Daemon Name in the domain.

Specified by:
getOperatingSystemAvailableProcessors in interface IClusterdaemon
Parameters:
clusterDaemonName - the cluster Daemon Name's name.
Returns:
the OperatingSystemAvailableProcessors of the cluster Daemon

getOperatingSystemName

public String getOperatingSystemName(String clusterDaemonName)
Get the OperatingSystemName a cluster Daemon Name in the domain.

Specified by:
getOperatingSystemName in interface IClusterdaemon
Parameters:
clusterDaemonName - the cluster Daemon Name's name.
Returns:
the operatingSystemName of the cluster Daemon

getOperatingSystemVersion

public String getOperatingSystemVersion(String clusterDaemonName)
Get the OperatingSystemVersion a cluster Daemon Name in the domain.

Specified by:
getOperatingSystemVersion in interface IClusterdaemon
Parameters:
clusterDaemonName - the cluster Daemon Name's name.
Returns:
the OperatingSystemVersion of the cluster Daemon

getRunTimeSpecVendor

public String getRunTimeSpecVendor(String clusterDaemonName)
Get the RunTimeSpecVendor a cluster Daemon Name in the domain.

Specified by:
getRunTimeSpecVendor in interface IClusterdaemon
Parameters:
clusterDaemonName - the cluster Daemon Name's name.
Returns:
the RunTimeSpecVendor of the cluster Daemon

getRunTimeSpecVersion

public String getRunTimeSpecVersion(String clusterDaemonName)
Get the RunTimeSpecVersion a cluster Daemon Name in the domain.

Specified by:
getRunTimeSpecVersion in interface IClusterdaemon
Parameters:
clusterDaemonName - the cluster Daemon Name's name.
Returns:
the RunTimeSpecVersion of the cluster Daemon

getRunTimeVmName

public String getRunTimeVmName(String clusterDaemonName)
Get the RunTimeVmName a cluster Daemon Name in the domain.

Specified by:
getRunTimeVmName in interface IClusterdaemon
Parameters:
clusterDaemonName - the cluster Daemon Name's name.
Returns:
the RunTimeVmName of the cluster Daemon

getRunTimeVmVendor

public String getRunTimeVmVendor(String clusterDaemonName)
Get the RunTimeVmVendor a cluster Daemon Name in the domain.

Specified by:
getRunTimeVmVendor in interface IClusterdaemon
Parameters:
clusterDaemonName - the cluster Daemon Name's name.
Returns:
the runTimeVmVendor of the cluster Daemon

getRunTimeVmVersion

public String getRunTimeVmVersion(String clusterDaemonName)
Get the RunTimeVmVersion a cluster Daemon Name in the domain.

Specified by:
getRunTimeVmVersion in interface IClusterdaemon
Parameters:
clusterDaemonName - the cluster Daemon Name's name.
Returns:
the RunTimeVmVersion of the cluster Daemon

getOperatingSystemArch

public String getOperatingSystemArch(String clusterDaemonName)
Get the OperatingSystemArch a cluster Daemon Name in the domain.

Specified by:
getOperatingSystemArch in interface IClusterdaemon
Parameters:
clusterDaemonName - the cluster Daemon Name's name.
Returns:
the OperatingSystem Architecture

getVmCurrentUsedMemory

public String getVmCurrentUsedMemory(String clusterDaemonName)
Get the vmCurrentUsedMemory a cluster Daemon Name in the domain.

Specified by:
getVmCurrentUsedMemory in interface IClusterdaemon
Parameters:
clusterDaemonName - the cluster Daemon Name's name. Getting remote Vm used Memory
Returns:
the value of current used memory of the cluster Daemon

getVmTotalMemory

public String getVmTotalMemory(String clusterDaemonName)
Get the vmTotalMemory a cluster Daemon Name in the domain.

Specified by:
getVmTotalMemory in interface IClusterdaemon
Parameters:
clusterDaemonName - the cluster Daemon Name's name. Getting remote Vm Total Memory
Returns:
the value of Vm Total memory of the cluster Daemon

getVmCurrentUsedHeapMemory

public String getVmCurrentUsedHeapMemory(String clusterDaemonName)
Getting remote Vm's Current used Heap memory

Specified by:
getVmCurrentUsedHeapMemory in interface IClusterdaemon
Parameters:
clusterDaemonName - the cluster Daemon Name's name.
Returns:
the value of Vm's Current used Heap memory

getVmCurrentUsedNonHeapMemory

public String getVmCurrentUsedNonHeapMemory(String clusterDaemonName)
Getting remote Vm's Current used non Heap memory

Specified by:
getVmCurrentUsedNonHeapMemory in interface IClusterdaemon
Parameters:
clusterDaemonName - the cluster Daemon Name's name.
Returns:
the value of Vm's Current used non Heap memory of the cluster Daemon

getOsCurrentUsedSpace

public String getOsCurrentUsedSpace(String clusterDaemonName)
Getting Operating system Current used space

Specified by:
getOsCurrentUsedSpace in interface IClusterdaemon
Parameters:
clusterDaemonName - the cluster Daemon Name's name.
Returns:
the value of Operating system Current used space of the cluster Daemon

getOsTotalSpace

public String getOsTotalSpace(String clusterDaemonName)
Getting Operating system Total space

Specified by:
getOsTotalSpace in interface IClusterdaemon
Parameters:
clusterDaemonName - the cluster Daemon Name's name.
Returns:
the value of Operating system Total space of the cluster Daemon

removeServer

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

Specified by:
removeServer in interface IClusterdaemon
Parameters:
serverName - the server to remove
saveIt - true to flush the clusterd configuration

startAllServers

public void startAllServers(String clusterDaemonName,
                            String otherParams)
Ask Cluster Daemon to start all the Servers from cluster daemon control.

Specified by:
startAllServers in interface IClusterdaemon
Parameters:
clusterdaemonName - name of the cluster daemon
otherParams - the servers to start

stopAllServers

public void stopAllServers(String clusterDaemonName,
                           String otherParams)
Ask Cluster Daemon to stop all the Servers from cluster daemon control.

Specified by:
stopAllServers in interface IClusterdaemon
Parameters:
clusterdaemonName - name of the cluster daemon
otherParams - the servers to stop

addServerToCluster

public void addServerToCluster(String clusterName,
                               String serverName,
                               String clusterDaemon,
                               String serverURL)
Add server to cluster.

Specified by:
addServerToCluster in interface ICluster
Parameters:
clusterName - cluster name
serverName - server name
clusterDaemon - cluster daemon name
serverURL - server url

startAllServers

public void startAllServers(String clusterName)
start all servers in the cluster.

Specified by:
startAllServers in interface ICluster
Parameters:
clusterName -

stopAllServers

public void stopAllServers(String clusterName)
stop all servers in the cluster.

Specified by:
stopAllServers in interface ICluster
Parameters:
clusterName -

getMcastAddr

public String getMcastAddr(String clusterName)
Specified by:
getMcastAddr in interface ICluster
Parameters:
clusterName -
Returns:
the multicast address

getMcastPort

public int getMcastPort(String clusterName)
Specified by:
getMcastPort in interface ICluster
Parameters:
clusterName -
Returns:
the multicast port

getDelayToRefresh

public int getDelayToRefresh(String clusterName)
Specified by:
getDelayToRefresh in interface ICluster
Parameters:
clusterName -
Returns:
the delay used by clients to update their cluster view

getServersNotInCluster

public String[] getServersNotInCluster(String clusterName)
Get the name of the servers in the domain except the ones that are belonging to this cluster.

Specified by:
getServersNotInCluster in interface IDomain
Parameters:
clusterName - the cluster name
Returns:
name of the servers that can be attached to the cluster

getServerThreadsInformation

public List<List<String>> getServerThreadsInformation(String serverName)
                                               throws Exception
Description copied from interface: IServerManagement
Get threads information for a given server managed in the domain.

Specified by:
getServerThreadsInformation in interface IServerManagement
Parameters:
serverName - Server name
Returns:
the current server threads information.
Throws:
Exception - when operation invocation fails

getServerThreadsInformation

public List<List<String>> getServerThreadsInformation(String jmxUrl,
                                                      String username,
                                                      String password)
                                               throws Exception
Description copied from interface: IServerManagement
Get threads information for a server identified by the a JMX Url.

Specified by:
getServerThreadsInformation in interface IServerManagement
Parameters:
jmxUrl -
username -
password -
Returns:
the current server threads information.
Throws:
Exception - when operation invocation fails

deploy

public void deploy(String fileName,
                   String serverName)
            throws Exception
Deploy a module on a target server in the domain.

Specified by:
deploy in interface IServerManagement
Parameters:
fileName - Name of the module's file.
serverName - Target server name.
Throws:
Exception - deploy operation failed.

undeploy

public void undeploy(String fileName,
                     String serverName)
              throws Exception
Uneploy a module on a target server.

Specified by:
undeploy in interface IServerManagement
Parameters:
fileName - Name of the module's file.
serverName - Target server name.
Throws:
Exception - undeploy operation failed.

remove

public boolean remove(String fileName,
                      String serverName)
               throws Exception
Remove a module on a target server.

Specified by:
remove in interface IServerManagement
Parameters:
fileName - Name of the module's file.
serverName - Target server name.
Returns:
true if the file successfully deleted
Throws:
Exception - remove operation failed.

developmentMode

public boolean developmentMode(String serviceName,
                               String serverName)
                        throws Exception
Return true if a given service is in 'development' mode for a given server managed in the domain.

Specified by:
developmentMode in interface IServerManagement
Parameters:
serviceName - The service name, for example "depmonitor".
serverName - Target server name.
Returns:
true if a given service is in 'development' mode, false otherwise
Throws:
Exception

getAttribute

public Object getAttribute(ObjectName on,
                           String attribute,
                           String serverName)
                    throws ManagementException
Gets the value of a specific attribute of a named MBean.

Specified by:
getAttribute in interface IBaseManagement
Parameters:
on - The ObjectName of the MBean.
attribute - A String specifying the name of the attribute to be retrieved.
serverName - The server name
Returns:
The value of the attribute.
Throws:
ManagementException - management operation failed

getAttributes

public J2EEMBeanAttributeInfo[] getAttributes(ObjectName objectName,
                                              String serverName)
                                       throws ManagementException
Get management attributes.

Specified by:
getAttributes in interface IBaseManagement
Parameters:
objectName -
serverName -
Returns:
attributes for the given objectName.
Throws:
ManagementException

getIntegerAttribute

public int getIntegerAttribute(ObjectName objectName,
                               String attrName)
                        throws ManagementException
Get the integer attribute value of an MBean in the current MBean Server.

Specified by:
getIntegerAttribute in interface IBaseManagement
Parameters:
objectName - The MBean's ObjectName
attrName - The attribute name
Returns:
The value of the attribute
Throws:
ManagementException

getKeyValue

public String getKeyValue(String objectName,
                          String keyName)
                   throws ManagementException
Return the value of a key property in an OBJECT_NAME.

Specified by:
getKeyValue in interface IBaseManagement
Parameters:
objectName - the OBJECT_NAME (String form)
keyName - key property name
Returns:
key value
Throws:
ManagementException

getKeyValues

public String[] getKeyValues(String[] objectNames,
                             String keyName)
                      throws ManagementException
Return the values of a key property in String OBJECT_NAMEs.

Specified by:
getKeyValues in interface IBaseManagement
Parameters:
objectNames - the OBJECT_NAMEs
keyName - key name
Returns:
array of key values
Throws:
ManagementException

getListMbean

public List getListMbean(ObjectName on,
                         String serverName)
                  throws ManagementException
Return the list of ObjectName Mbean gotten by the query in the current MbeanServer.

Specified by:
getListMbean in interface IBaseManagement
Parameters:
p_On - Query Mbeans to search
Returns:
The list of ObjectName
Throws:
ManagementException

getStringAttribute

public String getStringAttribute(ObjectName objectName,
                                 String attrName)
                          throws ManagementException
Get the String attribute value of an MBean in the current MBean Server.

Specified by:
getStringAttribute in interface IBaseManagement
Parameters:
objectName - The MBean's ObjectName
attrName - The attribute name
Returns:
The value of the attribute
Throws:
ManagementException

invoke

public Object invoke(ObjectName on,
                     String operation,
                     Object[] param,
                     String[] signature,
                     String serverName)
              throws ManagementException
Implementation of the invoke method to be applied to a server in the domain.

Specified by:
invoke in interface IBaseManagement
Parameters:
on - the ObjectName of the MBean that is the target of the invoke.
operation - operation to invoke
param - invoke parameters
signature - invoke parameters signature
serverName - The server's name
Returns:
The object returned by the operation
Throws:
ManagementException - management operation failed

isRegistered

public boolean isRegistered(ObjectName on,
                            String serverName)
                     throws ManagementException
Implementation of the isRegistered method to be applied to a server in the domain.

Specified by:
isRegistered in interface IBaseManagement
Parameters:
on - ObjectName of the MBean we are looking for
serverName - The server name
Returns:
True if the MBean is already registered in the MBean server, false otherwise or if an exception is catched.
Throws:
ManagementException - management operation failed

getServerConnection

public MBeanServerConnection getServerConnection(String serverName)
                                          throws ManagementException
Return the MBeanServer connection corresponding to a given server in the current domain. The connection for servers in the domain are provided by the DomainMonitor.

Specified by:
getServerConnection in interface IBaseManagement
Parameters:
serverName - The managed server name
Returns:
The MBeanServerConnection corresponding to the managed server
Throws:
ManagementException - Couldn't get the connection

getServerConnection

public MBeanServerConnection getServerConnection()
                                          throws ManagementException
Return the MBeanServer connection corresponding to a current server in the current domain. The connection for servers in the domain are provided by the DomainMonitor.

Specified by:
getServerConnection in interface IBaseManagement
Returns:
The MBeanServerConnection corresponding to the managed server
Throws:
ManagementException - Couldn't get the connection

setAttribute

public void setAttribute(ObjectName on,
                         String attribute,
                         Object value,
                         String serverName)
                  throws ManagementException
Sets the value of a specific attribute of a named MBean.

Specified by:
setAttribute in interface IBaseManagement
Parameters:
on - The ObjectName of the MBean.
serverName - The server name
attribute - A String specifying the name of the attribute to be set.
value - The value to set to the attribute.
Throws:
ManagementException - management operation failed

setAttribute

public void setAttribute(ObjectName on,
                         String attribute,
                         Object value)
                  throws ManagementException
Sets the value of a specific attribute of a named MBean within the current server.

Specified by:
setAttribute in interface IBaseManagement
Parameters:
on - The ObjectName of the MBean.
attribute - A String specifying the name of the attribute to be set.
value - The value to set to the attribute.
Throws:
ManagementException - management operation failed

getTomcatRealm

public ObjectName getTomcatRealm(String domainName,
                                 String serverName)
                          throws ManagementException
Description copied from interface: IBaseManagement
Get the ObjectName of the Tomcat Realm MBean.

Specified by:
getTomcatRealm in interface IBaseManagement
Parameters:
domainName - the domain's name
serverName - the server's name
Returns:
ObjectName of the Tomcat Realm MBean.
Throws:
ManagementException

getRealmItems

public List<?> getRealmItems(String realmType,
                             String securityRealmUsed,
                             String domainName,
                             String serverName)
                      throws ManagementException
Description copied from interface: IBaseManagement
Get realm items of the given type.

Specified by:
getRealmItems in interface IBaseManagement
Parameters:
realmType - realm type.
securityRealmUsed - the used security realm.
domainName - the domain's name
serverName - server's name
Returns:
real items of the given type
Throws:
ManagementException - any.

getRealmItems

public List<?> getRealmItems(String realmType,
                             String securityRealmUsed)
                      throws ManagementException
Description copied from interface: IBaseManagement
Get realm items of the given type within the current server of the current domain.

Specified by:
getRealmItems in interface IBaseManagement
Parameters:
realmType - realm type.
securityRealmUsed - the used security realm.
Returns:
realm items of the given type
Throws:
ManagementException - any.

getTomcatRealmItems

public List<?> getTomcatRealmItems(String usedSecurityRealm,
                                   String domainName,
                                   String serverName)
                            throws ManagementException
Specified by:
getTomcatRealmItems in interface IBaseManagement
Throws:
ManagementException


Copyright © 2010 OW2 Consortium. All Rights Reserved.