org.objectweb.jonas.server
Class JmxServer

java.lang.Object
  extended byorg.objectweb.jonas.server.JmxServer
All Implemented Interfaces:
JmxServerMBean, TimerEventListener

public class JmxServer
extends java.lang.Object
implements JmxServerMBean, TimerEventListener

MBean Class for Server Management MBean type: Standard MBean model: Delegate (Server.java)

Author:
Guillaume Riviere, Michel Bruno

Constructor Summary
JmxServer(Server server, java.lang.String serverName, java.lang.String version, java.lang.String protocols)
          constructor
 
Method Summary
 java.lang.Boolean getActivated()
          get monitoring activation
 int getActiveGroupCount()
          get the estimated number of active groups in the JOnAS server's initial thread group
 int getActiveThreadsCount()
          get the number of active threads in the JOnAS server's initial thread group
 java.lang.Long getCurrentTotalMemory()
          get jvm total memory
 java.lang.Long getCurrentUsedMemory()
          get jvm used memory
 java.lang.String getJonasName()
          Server name
 java.lang.String getJonasVersion()
          Server version
 java.lang.Long[] getMeasuresTable()
          get the table of value
 java.lang.Integer getNumberOfMeasures()
          get number of measures
 java.lang.String getProtocols()
          Protocols supported by this Server
 java.lang.Integer getRange()
          get range
 void runGC()
          run the garbage collector
 void setActivated(java.lang.Boolean act)
          set monitoring activation
 void setNumberOfMeasures(java.lang.Integer nb)
          set number of measures
 void setRange(java.lang.Integer range)
          set range
 void stop()
          Stop server (with stopping the JVM)
 void timeoutExpired(java.lang.Object arg)
          The measures timeout has expired Do not synchronize this method to avoid deadlocks!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JmxServer

public JmxServer(Server server,
                 java.lang.String serverName,
                 java.lang.String version,
                 java.lang.String protocols)
constructor

Parameters:
server - Server
serverName - server name
version - JOnAS version
protocols - protocols supported
Method Detail

getJonasName

public java.lang.String getJonasName()
Server name

Specified by:
getJonasName in interface JmxServerMBean
Returns:
String JOnAS server name

getJonasVersion

public java.lang.String getJonasVersion()
Server version

Specified by:
getJonasVersion in interface JmxServerMBean
Returns:
String JOnAS server version

getProtocols

public java.lang.String getProtocols()
Protocols supported by this Server

Specified by:
getProtocols in interface JmxServerMBean
Returns:
String protocols supported

stop

public void stop()
          throws java.rmi.RemoteException
Stop server (with stopping the JVM)

Specified by:
stop in interface JmxServerMBean
Throws:
java.rmi.RemoteException

runGC

public void runGC()
           throws java.rmi.RemoteException
run the garbage collector

Specified by:
runGC in interface JmxServerMBean
Throws:
java.rmi.RemoteException

getCurrentUsedMemory

public java.lang.Long getCurrentUsedMemory()
                                    throws java.rmi.RemoteException
get jvm used memory

Specified by:
getCurrentUsedMemory in interface JmxServerMBean
Returns:
Long - current used memory
Throws:
java.rmi.RemoteException

getCurrentTotalMemory

public java.lang.Long getCurrentTotalMemory()
                                     throws java.rmi.RemoteException
get jvm total memory

Specified by:
getCurrentTotalMemory in interface JmxServerMBean
Returns:
Long - current total memory
Throws:
java.rmi.RemoteException

setRange

public void setRange(java.lang.Integer range)
              throws java.rmi.RemoteException
set range

Specified by:
setRange in interface JmxServerMBean
Parameters:
range - range for free memory measurement
Throws:
java.rmi.RemoteException

getRange

public java.lang.Integer getRange()
                           throws java.rmi.RemoteException
get range

Specified by:
getRange in interface JmxServerMBean
Returns:
Integer - range
Throws:
java.rmi.RemoteException

setNumberOfMeasures

public void setNumberOfMeasures(java.lang.Integer nb)
                         throws java.rmi.RemoteException
set number of measures

Specified by:
setNumberOfMeasures in interface JmxServerMBean
Parameters:
nb - number of measures
Throws:
java.rmi.RemoteException

getNumberOfMeasures

public java.lang.Integer getNumberOfMeasures()
                                      throws java.rmi.RemoteException
get number of measures

Specified by:
getNumberOfMeasures in interface JmxServerMBean
Returns:
Integer number of measures
Throws:
java.rmi.RemoteException

getMeasuresTable

public java.lang.Long[] getMeasuresTable()
                                  throws java.rmi.RemoteException
get the table of value

Specified by:
getMeasuresTable in interface JmxServerMBean
Returns:
Long[] measures table
Throws:
java.rmi.RemoteException

timeoutExpired

public void timeoutExpired(java.lang.Object arg)
The measures timeout has expired Do not synchronize this method to avoid deadlocks!

Specified by:
timeoutExpired in interface TimerEventListener
Parameters:
arg - Object

setActivated

public void setActivated(java.lang.Boolean act)
set monitoring activation

Specified by:
setActivated in interface JmxServerMBean
Parameters:
act - Boolean

getActivated

public java.lang.Boolean getActivated()
get monitoring activation

Specified by:
getActivated in interface JmxServerMBean
Returns:
Boolean is activated

getActiveThreadsCount

public int getActiveThreadsCount()
get the number of active threads in the JOnAS server's initial thread group

Specified by:
getActiveThreadsCount in interface JmxServerMBean
Returns:
int the number of active threads

getActiveGroupCount

public int getActiveGroupCount()
get the estimated number of active groups in the JOnAS server's initial thread group

Specified by:
getActiveGroupCount in interface JmxServerMBean
Returns:
int the estimated number of active groups