org.eclipse.jetty.monitor.jmx
类 MonitorAction

java.lang.Object
  继承者 org.eclipse.jetty.monitor.jmx.NotifierGroup
      继承者 org.eclipse.jetty.monitor.jmx.MonitorAction
所有已实现的接口:
EventNotifier
直接已知子类:
JavaMonitorAction, SimpleAction

public abstract class MonitorAction
extends NotifierGroup

MonitorAction Abstract base class for all MonitorAction implementations. Receives notification when an associated EventTrigger is matched.


字段摘要
static int DEFAULT_POLL_INTERVAL
           
 
构造方法摘要
MonitorAction(EventTrigger trigger)
          Creates a new monitor action
MonitorAction(EventTrigger trigger, EventNotifier notifier)
          Creates a new monitor action
MonitorAction(EventTrigger trigger, EventNotifier notifier, long pollInterval)
          Creates a new monitor action
MonitorAction(EventTrigger trigger, EventNotifier notifier, long pollInterval, long pollDelay)
          Creates a new monitor action
 
方法摘要
 void doExecute(long timestamp)
          This method will be called when event trigger associated with this monitor action matches its conditions.
abstract  void execute(EventTrigger trigger, EventState<?> state, long timestamp)
          This method will be called to allow subclass to execute the desired action in response to the event.
 String getID()
          Retrieve the identification string of the monitor action
 long getPollDelay()
          Retrieve the poll delay
 long getPollInterval()
          Retrieve the poll interval
 EventTrigger getTrigger()
          Retrieve the event trigger of the monitor action
 
从类 org.eclipse.jetty.monitor.jmx.NotifierGroup 继承的方法
addNotifier, addNotifiers, getNotifiers, notify, removeNotifier, removeNotifiers
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

DEFAULT_POLL_INTERVAL

public static final int DEFAULT_POLL_INTERVAL
另请参见:
常量字段值
构造方法详细信息

MonitorAction

public MonitorAction(EventTrigger trigger)
              throws InvalidParameterException
Creates a new monitor action

参数:
trigger - event trigger to be associated with this action
抛出:
InvalidParameterException

MonitorAction

public MonitorAction(EventTrigger trigger,
                     EventNotifier notifier)
              throws InvalidParameterException
Creates a new monitor action

参数:
trigger - event trigger to be associated with this action
notifier - event notifier to be associated with this action
抛出:
InvalidParameterException

MonitorAction

public MonitorAction(EventTrigger trigger,
                     EventNotifier notifier,
                     long pollInterval)
              throws InvalidParameterException
Creates a new monitor action

参数:
trigger - event trigger to be associated with this action
notifier - event notifier to be associated with this action
pollInterval - interval for polling of the JMX server
抛出:
InvalidParameterException

MonitorAction

public MonitorAction(EventTrigger trigger,
                     EventNotifier notifier,
                     long pollInterval,
                     long pollDelay)
              throws InvalidParameterException
Creates a new monitor action

参数:
trigger - event trigger to be associated with this action
notifier - event notifier to be associated with this action
pollInterval - interval for polling of the JMX server
pollDelay - delay before starting to poll the JMX server
抛出:
InvalidParameterException
方法详细信息

getID

public final String getID()
Retrieve the identification string of the monitor action

返回:
unique identification string

getTrigger

public EventTrigger getTrigger()
Retrieve the event trigger of the monitor action

返回:
associated event trigger

getPollInterval

public long getPollInterval()
Retrieve the poll interval

返回:
interval value (in milliseconds)

getPollDelay

public long getPollDelay()
Retrieve the poll delay

返回:
delay value (in milliseconds)

doExecute

public final void doExecute(long timestamp)
This method will be called when event trigger associated with this monitor action matches its conditions.

参数:
timestamp - time stamp of the event

execute

public abstract void execute(EventTrigger trigger,
                             EventState<?> state,
                             long timestamp)
This method will be called to allow subclass to execute the desired action in response to the event.

参数:
trigger - event trigger associated with this monitor action
state - event state associated with current invocation of event trigger
timestamp - time stamp of the current invocation of event trigger


Copyright © 2013. All Rights Reserved.