org.eclipse.jetty.monitor.triggers
Class OrEventTrigger

java.lang.Object
  extended by org.eclipse.jetty.monitor.jmx.EventTrigger
      extended by org.eclipse.jetty.monitor.triggers.OrEventTrigger

public class OrEventTrigger
extends EventTrigger

AndEventTrigger EventTrigger aggregation using logical OR operation that executes matching of the aggregated event triggers in left to right order


Constructor Summary
OrEventTrigger(EventTrigger... triggers)
          Construct an event trigger and associate the array of event triggers to be aggregated by this trigger
OrEventTrigger(List<EventTrigger> triggers)
          Construct an event trigger and associate the list of event triggers to be aggregated by this trigger
 
Method Summary
 EventState getState(long timestamp)
          Retrieve the event state associated with specified invocation of the event trigger match method.
 boolean match(long timestamp)
          Verify if the event trigger conditions are in the appropriate state for an event to be triggered.
 String toString()
          Returns the string representation of this event trigger in the format "OR(triger1,trigger2,...)".
 
Methods inherited from class org.eclipse.jetty.monitor.jmx.EventTrigger
getID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OrEventTrigger

public OrEventTrigger(List<EventTrigger> triggers)
Construct an event trigger and associate the list of event triggers to be aggregated by this trigger

Parameters:
triggers - list of event triggers to add

OrEventTrigger

public OrEventTrigger(EventTrigger... triggers)
Construct an event trigger and associate the array of event triggers to be aggregated by this trigger

Parameters:
triggers - array of event triggers to add
Method Detail

match

public boolean match(long timestamp)
              throws Exception
Verify if the event trigger conditions are in the appropriate state for an event to be triggered. This event trigger will match if any of aggregated event triggers would return a match.

Specified by:
match in class EventTrigger
Returns:
true to trigger an event
Throws:
Exception
See Also:
EventTrigger.match(long)

getState

public EventState getState(long timestamp)
Retrieve the event state associated with specified invocation of the event trigger match method. This event trigger retrieves the combined event state of all aggregated event triggers.

Specified by:
getState in class EventTrigger
Parameters:
timestamp - time stamp associated with invocation
Returns:
event state or null if not found
See Also:
EventTrigger.getState(long)

toString

public String toString()
Returns the string representation of this event trigger in the format "OR(triger1,trigger2,...)".

Overrides:
toString in class Object
Returns:
string representation of the event trigger
See Also:
Object.toString()


Copyright © 1995-2011 Mort Bay Consulting. All Rights Reserved.