org.eclipse.jetty.monitor.jmx
Class EventState<TYPE>

java.lang.Object
  extended by org.eclipse.jetty.monitor.jmx.EventState<TYPE>

public class EventState<TYPE>
extends Object

EventState Holds the state of one or more event trigger instances to be used when sending notifications as well as executing the actions


Nested Class Summary
static class EventState.TriggerState<TYPE>
          State Holds the state of a single event trigger
 
Field Summary
protected  Map<String,EventState.TriggerState<TYPE>> _states
           
 
Constructor Summary
EventState()
          Constructs an empty event state
EventState(String id, String desc, TYPE value)
          Constructs an event state and adds a specified trigger state to it
 
Method Summary
 void add(EventState.TriggerState<TYPE> state)
          Adds a trigger state to the event state
 void addAll(Collection<EventState.TriggerState<TYPE>> entries)
          Adds a collection of trigger states to the event state
 EventState.TriggerState<TYPE> get(String id)
          Retrieves a single trigger state
 String toString()
          Returns a string representation of the event state
 Collection<EventState.TriggerState<TYPE>> values()
          Retrieves a collection of all trigger states of the event state
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_states

protected Map<String,EventState.TriggerState<TYPE>> _states
Constructor Detail

EventState

public EventState()
Constructs an empty event state


EventState

public EventState(String id,
                  String desc,
                  TYPE value)
Constructs an event state and adds a specified trigger state to it

Parameters:
id - unique identification string of the associated event trigger
desc - description of the associated event trigger
value - effective value of the MXBean attribute (if applicable)
Method Detail

add

public void add(EventState.TriggerState<TYPE> state)
Adds a trigger state to the event state

Parameters:
state - trigger state to add

addAll

public void addAll(Collection<EventState.TriggerState<TYPE>> entries)
Adds a collection of trigger states to the event state

Parameters:
entries - collection of trigger states to add

get

public EventState.TriggerState<TYPE> get(String id)
Retrieves a single trigger state

Parameters:
id - unique identification string of the event trigger
Returns:
requested trigger state or null if not found

values

public Collection<EventState.TriggerState<TYPE>> values()
Retrieves a collection of all trigger states of the event state

Returns:
collection of the trigger states

toString

public String toString()
Returns a string representation of the event state

Overrides:
toString in class Object
Returns:
string representation of the event state


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