org.jpox.management
Class ManagementManager

java.lang.Object
  extended byorg.jpox.management.ManagementManager

public class ManagementManager
extends java.lang.Object

Management interface for JPOX. Management operations and attributes are exposed through this interface that holds statistics linked to a PMF instance. The mechanics for starting and stopping JMX servers are not defined here, and must be done by plug-ins, by providing the implementation of ManagementServer. This Manager controls the lifecycle of management servers. A management server is started when an instance of this class is created, and its shutdown when the close operation is invoked The management server startup is triggered when the Manager gets enabled.


Constructor Summary
ManagementManager(PMFContext pmfContext)
          Constructor for Management
 
Method Summary
 void close()
          Close a instance.
 void disable()
          Disable the update of statistics
 void enable()
          Enable the update of statistics
 PMFContext getPmfContext()
          Accessor for the PMFContext
 long getStatisticValue(ManagementCategory cat)
          Accessor for the current statistic value for the given category
 long[] getStatisticValues()
          Accessor for the statistic values
 void increment(ManagementCategory cat)
          Increment in one the statistics of the given category.
 void increment(ManagementCategory[] cats)
          Increment in one the statistics of the given categories Before calling this method, it's recommended to check if the Manager is enabled in order to improve performance on disabled cases.
 boolean isEnabled()
          Whether this Manager is enabled
 void reset()
          Reset the statistics values
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ManagementManager

public ManagementManager(PMFContext pmfContext)
Constructor for Management

Parameters:
pmfContext - the pmfContext that owns this management
Method Detail

disable

public void disable()
Disable the update of statistics

Throws:
javax.jdo.JDOFatalInternalException - if the manager is closed

enable

public void enable()
Enable the update of statistics

Throws:
javax.jdo.JDOFatalInternalException - if the manager is closed

isEnabled

public boolean isEnabled()
Whether this Manager is enabled

Throws:
javax.jdo.JDOFatalInternalException - if the manager is closed

increment

public void increment(ManagementCategory cat)
Increment in one the statistics of the given category. Before calling this method, it's recommended to check if the Manager is enabled in order to improve performance on disabled cases. This pattern is very similar to Log frameworks.

Parameters:
cat - the management category
Throws:
javax.jdo.JDOFatalInternalException - if the manager is closed

increment

public void increment(ManagementCategory[] cats)
Increment in one the statistics of the given categories Before calling this method, it's recommended to check if the Manager is enabled in order to improve performance on disabled cases. This pattern is very similar to Log frameworks.

Parameters:
cats - the management categories
Throws:
javax.jdo.JDOFatalInternalException - if the manager is closed

getStatisticValue

public long getStatisticValue(ManagementCategory cat)
Accessor for the current statistic value for the given category

Parameters:
cat - the management category
Returns:
the current value for the statistic
Throws:
javax.jdo.JDOFatalInternalException - if the manager is closed

getStatisticValues

public long[] getStatisticValues()
Accessor for the statistic values

Returns:
the current value for the statistic
Throws:
javax.jdo.JDOFatalInternalException - if the manager is closed

reset

public void reset()
Reset the statistics values

Throws:
javax.jdo.JDOFatalInternalException - if the manager is closed

getPmfContext

public PMFContext getPmfContext()
Accessor for the PMFContext

Returns:
the PMFContext
Throws:
javax.jdo.JDOFatalInternalException - if the manager is closed

close

public void close()
Close a instance.

Throws:
javax.jdo.JDOFatalInternalException - if the manager is closed


Copyright © -2007 . All Rights Reserved.