|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.javasimon.jmx.SimonManagerMXBeanImpl
public class SimonManagerMXBeanImpl
Simon MXBean implementation. See SimonManagerMXBean for interface
documentation.
Most methods are implemented by calling the Manager.
Manager,
Simon,
SimonUtils| Field Summary | |
|---|---|
private Manager |
manager
|
| Constructor Summary | |
|---|---|
SimonManagerMXBeanImpl(Manager manager)
MXBean constructor. |
|
| 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. |
private CounterSample |
sampleCounter(Simon s)
Create a JMX Counter Sample from a Sample |
private StopwatchSample |
sampleStopwatch(Simon s)
Create a JMX Stopwatch Sample from a Stopwatch |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private Manager manager
| Constructor Detail |
|---|
public SimonManagerMXBeanImpl(Manager manager)
manager - instance of Manager, typically SimonManager.manager().| Method Detail |
|---|
public final void enable()
SimonManagerMXBean
enable in interface SimonManagerMXBeanManager.enable()public final void disable()
SimonManagerMXBean
disable in interface SimonManagerMXBeanManager.disable()public final boolean isEnabled()
SimonManagerMXBean
isEnabled in interface SimonManagerMXBeanManager.isEnabled()public final String[] getSimonNames()
SimonManagerMXBean
getSimonNames in interface SimonManagerMXBeanManager.getSimonNames()public final String[] getSimonNamesOrdered()
SimonManagerMXBean
getSimonNamesOrdered in interface SimonManagerMXBeanManager.getSimonNames()public final String getType(String name)
SimonManagerMXBean
getType in interface SimonManagerMXBeanname - name of Simon
public final SimonInfo[] getSimonInfos()
SimonManagerMXBean
getSimonInfos in interface SimonManagerMXBeanSimonInfo objectspublic final void clearManager()
SimonManagerMXBean
clearManager in interface SimonManagerMXBeanManager.clear()public final void enableSimon(String name)
SimonManagerMXBean
enableSimon in interface SimonManagerMXBeanname - name of the SimonSimon.setState(org.javasimon.SimonState, boolean)public final void disableSimon(String name)
SimonManagerMXBean
disableSimon in interface SimonManagerMXBeanname - name of the SimonSimon.setState(org.javasimon.SimonState, boolean)public final void inheritState(String name)
SimonManagerMXBean
inheritState in interface SimonManagerMXBeanname - name of the Simonprivate CounterSample sampleCounter(Simon s)
s - Counterpublic final CounterSample getCounterSample(String name)
SimonManagerMXBean
getCounterSample in interface SimonManagerMXBeanname - name of the Simon
CounterSamplepublic final CounterSample getCounterSampleAndReset(String name)
SimonManagerMXBean
getCounterSampleAndReset in interface SimonManagerMXBeanname - name of the Simon
CounterSamplepublic List<CounterSample> getCounterSamples(String namePattern)
getCounterSamples in interface SimonManagerMXBeannamePattern - Name pattern, null means all Counters
public List<CounterSample> getCounterSamples()
getCounterSamples in interface SimonManagerMXBeanprivate StopwatchSample sampleStopwatch(Simon s)
s - Stopwatchpublic final StopwatchSample getStopwatchSample(String name)
SimonManagerMXBean
getStopwatchSample in interface SimonManagerMXBeanname - name of the Simon
StopwatchSamplepublic final StopwatchSample getStopwatchSampleAndReset(String name)
SimonManagerMXBean
getStopwatchSampleAndReset in interface SimonManagerMXBeanname - name of the Simon
StopwatchSamplepublic List<StopwatchSample> getStopwatchSamples(String namePattern)
SimonManagerMXBean
getStopwatchSamples in interface SimonManagerMXBeannamePattern - name pattern (SimonPattern), null means all Stopwatches
public List<StopwatchSample> getStopwatchSamples()
SimonManagerMXBean
getStopwatchSamples in interface SimonManagerMXBeanpublic final void printSimonTree()
SimonManagerMXBean
printSimonTree in interface SimonManagerMXBeanSimonUtils.simonTreeString(org.javasimon.Simon)public final void reset(String name)
SimonManagerMXBean
reset in interface SimonManagerMXBeanname - name of the Simon
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||