com.oakgrovesystems.reactor
Class ReactorEvent

java.lang.Object
  |
  +--com.oakgrovesystems.reactor.ReactorEvent
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class ReactorEvent
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

ReactorEvents are used by the Reactor System to trigger Reactor Policy execution. A single Event can triggger the execution of multiple Reactor Policy objects. And a single Reactor Policy can be triggered by different kinds of events. ReactorEvents are characterized by their type (a.k.a. name) (e.g. "ProcessStateChange"), their source (e.g. "ProcessCommandService", "TopLevelProcessX.SubProc1", etc.), and their attributes, which are stored in a Map. ReactorEvents are sent from various parts of the Reactor system to the Policy Execution Service, which decides which Policy objects should be executed. Events can also optionally be scoped to the ancestor nodes of a given node, called the scopeNodeId. In this case, only policies associated with the ancestor nodes of the scopeNodeId are elegible to be started as a result of this event. ReactorEvent objects are immutable.

See Also:
Serialized Form

Constructor Summary
ReactorEvent(java.lang.String eventName, java.lang.String eventSource)
          Creates a ReactorEvent of the given type, with the given source, an empty Map of attributes, and a null scopeNodeId.
ReactorEvent(java.lang.String eventName, java.lang.String eventSource, java.util.Map eventAttributes, com.oakgrovesystems.reactor.ReactorObjectId scopeNodeId)
          Creates a ReactorEvent of the given type, with the given source, attributes and scopeNodeId.
 
Method Summary
 java.lang.Object clone()
           
 java.util.Map getEventAttributes()
          Returns a Map containing the attributes of this event
 java.lang.String getEventName()
          Returns the type of event
 java.lang.String getEventSource()
          Returns the name of the service or object that generated this event
 com.oakgrovesystems.reactor.ReactorObjectId getScopeNodeId()
          Returns the name of the service that generated this event
 boolean sameAs(com.oakgrovesystems.reactor.ReactorEvent other)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ReactorEvent

public ReactorEvent(java.lang.String eventName,
                    java.lang.String eventSource)
Creates a ReactorEvent of the given type, with the given source, an empty Map of attributes, and a null scopeNodeId. If either String is null, an empty String is used.


ReactorEvent

public ReactorEvent(java.lang.String eventName,
                    java.lang.String eventSource,
                    java.util.Map eventAttributes,
                    com.oakgrovesystems.reactor.ReactorObjectId scopeNodeId)
Creates a ReactorEvent of the given type, with the given source, attributes and scopeNodeId. If either String is null, an empty String is used. If eventAttributes is null, an empty Map is created and used.

Method Detail

getEventName

public java.lang.String getEventName()
Returns the type of event


getEventSource

public java.lang.String getEventSource()
Returns the name of the service or object that generated this event


getEventAttributes

public java.util.Map getEventAttributes()
Returns a Map containing the attributes of this event


getScopeNodeId

public com.oakgrovesystems.reactor.ReactorObjectId getScopeNodeId()
Returns the name of the service that generated this event


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

sameAs

public boolean sameAs(com.oakgrovesystems.reactor.ReactorEvent other)

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Overrides:
clone in class java.lang.Object
java.lang.CloneNotSupportedException


Copyright (c) 1999-2004 Oak Grove Systems. All Rights Reserved.