|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.EventObject
org.springframework.webflow.execution.Event
public class Event
Signals the occurrence of something an active flow execution should respond to. Each event has a string id that provides a key for identifying what happened: e.g "coinInserted", or "pinDropped". Events may have attributes that provide arbitrary payload data, e.g. "coin.amount=25", or "pinDropSpeed=25ms".
As an example, a "submit" event might signal that a Submit button was pressed in a web browser. A "success" event might signal an action executed successfully. A "finish" event might signal a subflow ended normally.
Why is this not an interface? A specific design choice. An event is not a strategy that defines a generic type or role--it is essentially an immutable value object. It is expected that specializations of this base class be "Events" and not part of some other inheritance hierarchy.
Field Summary |
---|
Fields inherited from class java.util.EventObject |
---|
source |
Constructor Summary | |
---|---|
Event(java.lang.Object source,
java.lang.String id)
Create a new event with the specified id and no payload. |
|
Event(java.lang.Object source,
java.lang.String id,
AttributeMap attributes)
Create a new event with the specified id and payload attributes. |
Method Summary | |
---|---|
AttributeMap |
getAttributes()
Returns an unmodifiable map storing the attributes of this event. |
java.lang.String |
getId()
Returns the event identifier. |
long |
getTimestamp()
Returns the time at which the event occurred, represented as the number of milliseconds since January 1, 1970, 00:00:00 GMT. |
java.lang.String |
toString()
|
Methods inherited from class java.util.EventObject |
---|
getSource |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Event(java.lang.Object source, java.lang.String id)
id
and no payload.
source
- the source of the event (required)id
- the event identifier (required)public Event(java.lang.Object source, java.lang.String id, AttributeMap attributes)
id
and payload attributes.
source
- the source of the event (required)id
- the event identifier (required)attributes
- additional event attributesMethod Detail |
---|
public java.lang.String getId()
public long getTimestamp()
public AttributeMap getAttributes()
null
.
public java.lang.String toString()
toString
in class java.util.EventObject
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |