|
|||||||||
| Home >> All >> javax >> management >> [ monitor overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
javax.management.monitor
Class CounterMonitor

java.lang.Objectjavax.management.NotificationBroadcasterSupport
javax.management.monitor.Monitor
javax.management.monitor.CounterMonitor
- All Implemented Interfaces:
- CounterMonitorMBean, javax.management.MBeanRegistration, MonitorMBean, javax.management.NotificationBroadcaster, java.io.Serializable
- public class CounterMonitor
- extends Monitor
- implements CounterMonitorMBean
- extends Monitor
The counter monitor service.
Revisions:
20020319 Adrian Brock:
- Reset the threshold when the value becomes negative in difference mode
20020326 Adrian Brock:
- The spec says the modulus should be *strictly* exceeded. It appears from testing the RI, it is a mathematical definition of modulus. e.g. 10 exceeds a modulus of 10
- Version:
- $Revision: 1.3 $
| Nested Class Summary |
| Nested classes inherited from class javax.management.monitor.Monitor |
|
| Field Summary | |
private java.lang.Number |
derivedGauge
The derived gauge. |
private long |
derivedGaugeTimeStamp
The derived gauge timeStamp. |
(package private) boolean |
differenceMode
Difference mode. |
(package private) java.lang.Number |
initialThreshold
The last stated threshold. |
private java.lang.Number |
lastValue
The last value. |
(package private) java.lang.Number |
modulus
The modulus. |
(package private) boolean |
notify
Notify. |
(package private) java.lang.Number |
offset
The offset. |
(package private) java.lang.Number |
threshold
The threshold. |
(package private) int |
THRESHOLD_ERROR_NOTIFIED
The threshold type error has been notified. |
(package private) int |
THRESHOLD_EXCEEDED_NOTIFIED
The counter threshold exceeded has been notified. |
| Fields inherited from class javax.management.monitor.Monitor |
active, alreadyNotified, dbgTag, granularityPeriod, objectName, OBSERVED_ATTRIBUTE_ERROR_NOTIFIED, OBSERVED_ATTRIBUTE_TYPE_ERROR_NOTIFIED, OBSERVED_OBJECT_ERROR_NOTIFIED, observedAttribute, observedObject, RESET_FLAGS_ALREADY_NOTIFIED, RUNTIME_ERROR_NOTIFIED, scheduler, server |
| Fields inherited from class javax.management.NotificationBroadcasterSupport |
log |
| Constructor Summary | |
CounterMonitor()
Default Constructor |
|
| Method Summary | |
(package private) java.lang.Number |
add(java.lang.Number value1,
java.lang.Number value2)
Add two numbers together. |
java.lang.Number |
getDerivedGauge()
Retrieves the derived gauge. |
long |
getDerivedGaugeTimeStamp()
Retrieves the derived gauge timestamp. |
boolean |
getDifferenceMode()
Retrieves the difference mode flag. |
java.lang.Number |
getModulus()
Retrieves the modulus. |
javax.management.MBeanNotificationInfo[] |
getNotificationInfo()
|
boolean |
getNotify()
Retrieves the notify on/off switch. |
java.lang.Number |
getOffset()
Retrieves the offset. |
java.lang.Number |
getThreshold()
Retrieves the threshold. |
(package private) java.lang.Number |
getZero(java.lang.Number value)
Get zero for the type passed. |
(package private) void |
monitor(javax.management.MBeanAttributeInfo attributeInfo,
java.lang.Object value)
Perform the monitor specific processing. |
(package private) void |
sendThresholdErrorNotification(java.lang.Object value)
Send a threshold error event. |
(package private) void |
sendThresholdExceededNotification(java.lang.Object value)
Send a threshold exceeded event. |
void |
setDifferenceMode(boolean value)
Sets the difference mode flag. |
void |
setModulus(java.lang.Number value)
Sets the modulus. |
void |
setNotify(boolean value)
Sets the notify on/off switch. |
void |
setOffset(java.lang.Number value)
Sets the offset. |
void |
setThreshold(java.lang.Number value)
Sets the threshold. |
void |
start()
Starts the monitor. |
(package private) java.lang.Number |
sub(java.lang.Number value1,
java.lang.Number value2)
Subtract two numbers. |
| Methods inherited from class javax.management.monitor.Monitor |
getGranularityPeriod, getObservedAttribute, getObservedObject, isActive, postDeregister, postRegister, preDeregister, preRegister, runMonitor, sendAttributeErrorNotification, sendAttributeTypeErrorNotification, sendNotification, sendObjectErrorNotification, sendRuntimeErrorNotification, setGranularityPeriod, setObservedAttribute, setObservedObject, stop |
| Methods inherited from class javax.management.NotificationBroadcasterSupport |
addNotificationListener, getListenerMap, removeNotificationListener, sendNotification |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.management.monitor.MonitorMBean |
getGranularityPeriod, getObservedAttribute, getObservedObject, isActive, setGranularityPeriod, setObservedAttribute, setObservedObject, stop |
| Field Detail |
THRESHOLD_EXCEEDED_NOTIFIED
int THRESHOLD_EXCEEDED_NOTIFIED
- The counter threshold exceeded has been notified.
THRESHOLD_ERROR_NOTIFIED
int THRESHOLD_ERROR_NOTIFIED
- The threshold type error has been notified.
derivedGauge
private java.lang.Number derivedGauge
- The derived gauge.
lastValue
private java.lang.Number lastValue
- The last value.
derivedGaugeTimeStamp
private long derivedGaugeTimeStamp
- The derived gauge timeStamp.
offset
java.lang.Number offset
- The offset.
modulus
java.lang.Number modulus
- The modulus.
threshold
java.lang.Number threshold
- The threshold.
initialThreshold
java.lang.Number initialThreshold
- The last stated threshold.
differenceMode
boolean differenceMode
- Difference mode.
notify
boolean notify
- Notify.
| Constructor Detail |
CounterMonitor
public CounterMonitor()
- Default Constructor
| Method Detail |
getNotificationInfo
public javax.management.MBeanNotificationInfo[] getNotificationInfo()
- Specified by:
getNotificationInfoin interfacejavax.management.NotificationBroadcaster
getDerivedGauge
public java.lang.Number getDerivedGauge()
- Description copied from interface:
CounterMonitorMBean - Retrieves the derived gauge.
- Specified by:
getDerivedGaugein interfaceCounterMonitorMBean
getDerivedGaugeTimeStamp
public long getDerivedGaugeTimeStamp()
- Description copied from interface:
CounterMonitorMBean - Retrieves the derived gauge timestamp.
- Specified by:
getDerivedGaugeTimeStampin interfaceCounterMonitorMBean
getDifferenceMode
public boolean getDifferenceMode()
- Description copied from interface:
CounterMonitorMBean - Retrieves the difference mode flag.
- Specified by:
getDifferenceModein interfaceCounterMonitorMBean
setDifferenceMode
public void setDifferenceMode(boolean value)
- Description copied from interface:
CounterMonitorMBean - Sets the difference mode flag.
- Specified by:
setDifferenceModein interfaceCounterMonitorMBean
getModulus
public java.lang.Number getModulus()
- Description copied from interface:
CounterMonitorMBean - Retrieves the modulus.
- Specified by:
getModulusin interfaceCounterMonitorMBean
setModulus
public void setModulus(java.lang.Number value) throws java.lang.IllegalArgumentException
- Description copied from interface:
CounterMonitorMBean - Sets the modulus.
- Specified by:
setModulusin interfaceCounterMonitorMBean
getNotify
public boolean getNotify()
- Description copied from interface:
CounterMonitorMBean - Retrieves the notify on/off switch.
- Specified by:
getNotifyin interfaceCounterMonitorMBean
setNotify
public void setNotify(boolean value)
- Description copied from interface:
CounterMonitorMBean - Sets the notify on/off switch.
- Specified by:
setNotifyin interfaceCounterMonitorMBean
getOffset
public java.lang.Number getOffset()
- Description copied from interface:
CounterMonitorMBean - Retrieves the offset.
- Specified by:
getOffsetin interfaceCounterMonitorMBean
setOffset
public void setOffset(java.lang.Number value) throws java.lang.IllegalArgumentException
- Description copied from interface:
CounterMonitorMBean - Sets the offset.
- Specified by:
setOffsetin interfaceCounterMonitorMBean
getThreshold
public java.lang.Number getThreshold()
- Description copied from interface:
CounterMonitorMBean - Retrieves the threshold.
REVIEW: zero threshold
- Specified by:
getThresholdin interfaceCounterMonitorMBean
setThreshold
public void setThreshold(java.lang.Number value) throws java.lang.IllegalArgumentException
- Description copied from interface:
CounterMonitorMBean - Sets the threshold.
REVIEW: zero threshold
- Specified by:
setThresholdin interfaceCounterMonitorMBean
start
public void start()
- Description copied from interface:
MonitorMBean - Starts the monitor.
- Specified by:
startin interfaceMonitorMBean- Overrides:
startin classMonitor
monitor
void monitor(javax.management.MBeanAttributeInfo attributeInfo, java.lang.Object value) throws java.lang.Exception
- Description copied from class:
Monitor - Perform the monitor specific processing.
getZero
java.lang.Number getZero(java.lang.Number value)
- Get zero for the type passed.
add
java.lang.Number add(java.lang.Number value1, java.lang.Number value2)
- Add two numbers together.
sub
java.lang.Number sub(java.lang.Number value1, java.lang.Number value2)
- Subtract two numbers.
sendThresholdExceededNotification
void sendThresholdExceededNotification(java.lang.Object value)
- Send a threshold exceeded event.
This is only performed when requested and it has not already been sent.
sendThresholdErrorNotification
void sendThresholdErrorNotification(java.lang.Object value)
- Send a threshold error event.
This is only performed when requested and it has not already been sent.
|
|||||||||
| Home >> All >> javax >> management >> [ monitor overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC