| java.lang.Object java.util.EventObject org.springframework.webflow.execution.Event
Event | final public class Event extends EventObject (Code) | | 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 inheritence hierarchy.
author: Keith Donald author: Erwin Vervaet author: Colin Sampaleanu |
Constructor Summary | |
public | Event(Object source, String id) Create a new event with the specified id and no payload. | public | Event(Object source, String id, AttributeMap attributes) Create a new event with the specified id and payload
attributes. |
Method Summary | |
public AttributeMap | getAttributes() Returns an unmodifiable map storing the attributes of this event. | public String | getId() Returns the event identifier. | public long | getTimestamp() Returns the time at which the event occured, represented as the number of
milliseconds since January 1, 1970, 00:00:00 GMT. | public String | toString() |
Event | public Event(Object source, String id)(Code) | | Create a new event with the specified id and no payload.
Parameters: source - the source of the event (required) Parameters: id - the event identifier (required) |
Event | public Event(Object source, String id, AttributeMap attributes)(Code) | | Create a new event with the specified id and payload
attributes.
Parameters: source - the source of the event (required) Parameters: id - the event identifier (required) Parameters: attributes - additional event attributes |
getAttributes | public AttributeMap getAttributes()(Code) | | Returns an unmodifiable map storing the attributes of this event. Never
returns null .
the event attributes (payload) |
getId | public String getId()(Code) | | Returns the event identifier.
the event id |
getTimestamp | public long getTimestamp()(Code) | | Returns the time at which the event occured, represented as the number of
milliseconds since January 1, 1970, 00:00:00 GMT.
the timestamp |
|
|