org.javasimon.jmx
Interface SimonManagerMXBean

All Known Implementing Classes:
SimonManagerMXBeanImpl

public interface SimonManagerMXBean

Interface of Simon management bean (MXBean) representing single point of access to a particular Simon Manager.

It provides general management tasks over all Simons for a single Manager (hierarchy of Simons) plus some useful util functions.

Since:
2.0
Author:
Radovan Sninsky

Method Summary
 void clearManager()
          Clears the Manager (ignored if manager is disabled).
 void disable()
          Disables the Simon Manager, disable monitoring application by Simons.
 void disableSimon(String name)
          Disables particular Simon only.
 void enable()
          Enables the Simon Manager, enable monitoring application by Simons.
 void enableSimon(String name)
          Enables particular Simon only.
 CounterSample getCounterSample(String name)
          Retrieves sample data object for a particular Counter.
 CounterSample getCounterSampleAndReset(String name)
          Retrieves sample data object for a particular Counter and resets it.
 List<CounterSample> getCounterSamples()
          Sample all Counters
 List<CounterSample> getCounterSamples(String namePattern)
          Sample all Counters whose name matches given pattern
 SimonInfo[] getSimonInfos()
          Returns array containing names and types of all existing Simons ordered naturally by name.
 String[] getSimonNames()
          Returns array containing full hierarchical names of all existing Simons.
 String[] getSimonNamesOrdered()
          Returns array containing full hierarchical names of all existing Simons in natural String order.
 StopwatchSample getStopwatchSample(String name)
          Retrieves sample data object for a particular Stopwatch.
 StopwatchSample getStopwatchSampleAndReset(String name)
          Retrieves sample data object for a particular Stopwatch and resets it.
 List<StopwatchSample> getStopwatchSamples()
          Sample all Stopwaches.
 List<StopwatchSample> getStopwatchSamples(String namePattern)
          Sample all Stopwaches whose name matches given pattern.
 String getType(String name)
          Returns type of Simon, either COUNTER, STOPWATCH or UNKNOWN.
 void inheritState(String name)
          Lets the Simon to inherit its enable/disable state from its parent.
 boolean isEnabled()
          Returns true if the Simon Manager is enabled, if monitoring is enabled.
 void printSimonTree()
          Prints multi-line string containing Simon tree starting with the specified Simon to standard output.
 void reset(String name)
          Resets the particular Simon by its name.
 

Method Detail

enable

void enable()
Enables the Simon Manager, enable monitoring application by Simons.

See Also:
Manager.enable()

disable

void disable()
Disables the Simon Manager, disable monitoring application by Simons.

See Also:
Manager.disable()

isEnabled

boolean isEnabled()
Returns true if the Simon Manager is enabled, if monitoring is enabled.

Returns:
true if the Simon Manager is enabled
See Also:
Manager.isEnabled()

getSimonNames

String[] getSimonNames()
Returns array containing full hierarchical names of all existing Simons.

Returns:
array of all Simon names
See Also:
Manager.getSimonNames()

getSimonNamesOrdered

String[] getSimonNamesOrdered()
Returns array containing full hierarchical names of all existing Simons in natural String order.

Returns:
array of all Simon names (ordered)
See Also:
Manager.getSimonNames()

getType

String getType(String name)
Returns type of Simon, either COUNTER, STOPWATCH or UNKNOWN.

Parameters:
name - name of Simon
Returns:
string COUNTER if Counter Simon, STOPWATCH if Stopwatch Simon or UKNOWN if there is no Simon just undefined hierarchy node

getSimonInfos

SimonInfo[] getSimonInfos()
Returns array containing names and types of all existing Simons ordered naturally by name.

Returns:
array of SimonInfo objects

clearManager

void clearManager()
Clears the Manager (ignored if manager is disabled). All Simons are lost, but the configuration is preserved.

See Also:
Manager.clear()

enableSimon

void enableSimon(String name)
Enables particular Simon only.

Parameters:
name - name of the Simon
See Also:
Simon.setState(org.javasimon.SimonState, boolean)

disableSimon

void disableSimon(String name)
Disables particular Simon only.

Parameters:
name - name of the Simon
See Also:
Simon.setState(org.javasimon.SimonState, boolean)

inheritState

void inheritState(String name)
Lets the Simon to inherit its enable/disable state from its parent.

Parameters:
name - name of the Simon

getCounterSample

CounterSample getCounterSample(String name)
Retrieves sample data object for a particular Counter.

Parameters:
name - name of the Simon
Returns:
sample object or null if Simon with entered name doesn't exist
See Also:
CounterSample

getStopwatchSample

StopwatchSample getStopwatchSample(String name)
Retrieves sample data object for a particular Stopwatch.

Parameters:
name - name of the Simon
Returns:
sample object or null if Simon with entered name doesn't exist
See Also:
StopwatchSample

getCounterSampleAndReset

CounterSample getCounterSampleAndReset(String name)
Retrieves sample data object for a particular Counter and resets it.

Parameters:
name - name of the Simon
Returns:
sample object or null if Simon with entered name doesn't exist
See Also:
CounterSample

getStopwatchSampleAndReset

StopwatchSample getStopwatchSampleAndReset(String name)
Retrieves sample data object for a particular Stopwatch and resets it.

Parameters:
name - name of the Simon
Returns:
sample object or null if Simon with entered name doesn't exist
See Also:
StopwatchSample

reset

void reset(String name)
Resets the particular Simon by its name.

Parameters:
name - name of the Simon

printSimonTree

void printSimonTree()
Prints multi-line string containing Simon tree starting with the specified Simon to standard output.

See Also:
SimonUtils.simonTreeString(org.javasimon.Simon)

getCounterSamples

List<CounterSample> getCounterSamples()
Sample all Counters

Returns:
One Sample for each Counter

getCounterSamples

List<CounterSample> getCounterSamples(String namePattern)
Sample all Counters whose name matches given pattern

Parameters:
namePattern - Name pattern, null means all Counters
Returns:
One Sample for each Counter

getStopwatchSamples

List<StopwatchSample> getStopwatchSamples(String namePattern)
Sample all Stopwaches whose name matches given pattern.

Parameters:
namePattern - name pattern (SimonPattern), null means all Stopwatches
Returns:
one Sample for each Stopwatch

getStopwatchSamples

List<StopwatchSample> getStopwatchSamples()
Sample all Stopwaches.

Returns:
one Sample for each Stopwatch


Copyright © 2013. All Rights Reserved.