org.jboss.monitor
Class ThresholdMonitor

java.lang.Object
  extended byorg.jboss.mx.util.JBossNotificationBroadcasterSupport (src) 
      extended byorg.jboss.system.ServiceMBeanSupport (src) 
          extended byorg.jboss.monitor.JBossMonitor (src) 
              extended byorg.jboss.monitor.ThresholdMonitor
All Implemented Interfaces:
JBossMonitorMBean (src) , MBeanRegistration (src) , NotificationBroadcaster (src) , NotificationEmitter (src) , java.lang.Runnable, Service (src) , ServiceMBean (src) , ThresholdMonitorMBean (src)

public class ThresholdMonitor
extends JBossMonitor (src)
implements ThresholdMonitorMBean (src) , java.lang.Runnable

Comment


Field Summary
protected  java.lang.Class attributeClass
           
protected  int compareTo
           
protected  java.lang.Number thresholdValue
           
 
Fields inherited from class org.jboss.monitor.JBossMonitor (src)
alertListeners, alertSent, attribute, enabled, log, monitorName, observedObject, period, thresholdString, triggeredAttributeValue, triggerTime
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport (src)
server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.system.ServiceMBean (src)
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
Constructor Summary
ThresholdMonitor()
           
 
Method Summary
protected  int compare(java.lang.Object value)
           
 int getCompareTo()
           
 java.lang.Number getThresholdValue()
          real actual numeric threshold value
protected  void parseThresholdValue()
           
 void setCompareTo(int compare)
           
 void setThreshold(java.lang.String val)
           
protected  void startService()
          Sub-classes should override this method to provide custum 'start' logic.
protected  void testThreshold()
           
 
Methods inherited from class org.jboss.monitor.JBossMonitor (src)
alerted, clearAlert, getAlertListeners, getEnabled, getMonitorName, getObservedAttribute, getObservedObject, getPeriod, getThreshold, getTriggeredAttributeValue, getTriggerTime, run, setAlertListeners, setEnabled, setMonitorName, setObservedAttribute, setObservedObject, setPeriod, startMonitorThread, stopService
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport (src)
create, createService, destroy, destroyService, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, stop
 
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport (src)
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.monitor.JBossMonitorMBean (src)
alerted, clearAlert, getAlertListeners, getEnabled, getMonitorName, getObservedAttribute, getObservedObject, getPeriod, getThreshold, getTriggeredAttributeValue, getTriggerTime, setAlertListeners, setEnabled, setMonitorName, setObservedAttribute, setObservedObject, setPeriod
 
Methods inherited from interface org.jboss.system.ServiceMBean (src)
getName, getState, getStateString, jbossInternalLifecycle
 
Methods inherited from interface org.jboss.system.Service (src)
create, destroy, start, stop
 
Methods inherited from interface java.lang.Runnable
run
 

Field Detail

thresholdValue

protected java.lang.Number thresholdValue

compareTo

protected int compareTo

attributeClass

protected java.lang.Class attributeClass
Constructor Detail

ThresholdMonitor

public ThresholdMonitor()
Method Detail

parseThresholdValue

protected void parseThresholdValue()

compare

protected int compare(java.lang.Object value)

startService

protected void startService()
                     throws java.lang.Exception
Description copied from class: ServiceMBeanSupport (src)
Sub-classes should override this method to provide custum 'start' logic.

This method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.

Overrides:
startService in class JBossMonitor (src)
Throws:
java.lang.Exception

testThreshold

protected void testThreshold()
Specified by:
testThreshold in class JBossMonitor (src)

getCompareTo

public int getCompareTo()
Specified by:
getCompareTo in interface ThresholdMonitorMBean (src)

setCompareTo

public void setCompareTo(int compare)
Specified by:
setCompareTo in interface ThresholdMonitorMBean (src)

getThresholdValue

public java.lang.Number getThresholdValue()
Description copied from interface: ThresholdMonitorMBean (src)
real actual numeric threshold value

Specified by:
getThresholdValue in interface ThresholdMonitorMBean (src)
Returns:

setThreshold

public void setThreshold(java.lang.String val)
Specified by:
setThreshold in interface JBossMonitorMBean (src)
Overrides:
setThreshold in class JBossMonitor (src)