org.eclipse.jetty.monitor.triggers
Class AggregateEventTrigger

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

public class AggregateEventTrigger
extends EventTrigger

AggregateEventTrigger EventTrigger aggregation that executes every aggregated event triggers in left to right order, and returns match if any one of them have returned match.


Field Summary
protected  List<EventTrigger> _triggers
           
 
Constructor Summary
AggregateEventTrigger()
          Construct an event trigger
AggregateEventTrigger(EventTrigger... triggers)
          Construct an event trigger and associate the array of event triggers to be aggregated by this trigger
AggregateEventTrigger(List<EventTrigger> triggers)
          Construct an event trigger and associate the list of event triggers to be aggregated by this trigger
 
Method Summary
 void add(EventTrigger trigger)
           
 void addAll(EventTrigger... triggers)
           
 void addAll(List<EventTrigger> triggers)
           
 EventState getState(long timestamp)
          Retrieve the event state associated with specified invocation of the event trigger match method.
 boolean match(long timestamp)
          Abstract method to 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 "AND(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
 

Field Detail

_triggers

protected final List<EventTrigger> _triggers
Constructor Detail

AggregateEventTrigger

public AggregateEventTrigger()
Construct an event trigger


AggregateEventTrigger

public AggregateEventTrigger(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

AggregateEventTrigger

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

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

add

public void add(EventTrigger trigger)
Parameters:
trigger -

addAll

public void addAll(List<EventTrigger> triggers)
Parameters:
triggers -

addAll

public void addAll(EventTrigger... triggers)
Parameters:
triggers -

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)

match

public boolean match(long timestamp)
              throws Exception
Description copied from class: EventTrigger
Abstract method to verify if the event trigger conditions are in the appropriate state for an event to be triggered

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

toString

public String toString()
Returns the string representation of this event trigger in the format "AND(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.