Class Event
- java.lang.Object
-
- org.apache.mina.statemachine.event.Event
-
public class Event extends java.lang.ObjectRepresents an event which typically corresponds to a method call on a proxy. An event has an id and zero or more arguments typically corresponding to the method arguments.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Object[]argumentsprivate StateContextcontextprivate java.lang.Objectidstatic java.lang.StringWILDCARD_EVENT_IDThe wildcard event
-
Constructor Summary
Constructors Constructor Description Event(java.lang.Object id, StateContext context)Creates a newEventwith the specified id and no arguments.Event(java.lang.Object id, StateContext context, java.lang.Object[] arguments)Creates a newEventwith the specified id and arguments.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object[]getArguments()StateContextgetContext()java.lang.ObjectgetId()java.lang.StringtoString()
-
-
-
Field Detail
-
WILDCARD_EVENT_ID
public static final java.lang.String WILDCARD_EVENT_ID
The wildcard event- See Also:
- Constant Field Values
-
id
private final java.lang.Object id
-
context
private final StateContext context
-
arguments
private final java.lang.Object[] arguments
-
-
Constructor Detail
-
Event
public Event(java.lang.Object id, StateContext context)Creates a newEventwith the specified id and no arguments.- Parameters:
id- the event id.context- theStateContextthe event was triggered for.
-
Event
public Event(java.lang.Object id, StateContext context, java.lang.Object[] arguments)Creates a newEventwith the specified id and arguments.- Parameters:
id- the event id.context- theStateContextthe event was triggered for.arguments- the event arguments.
-
-
Method Detail
-
getContext
public StateContext getContext()
- Returns:
- the
StateContextthisEventwas triggered for.
-
getId
public java.lang.Object getId()
- Returns:
- the id of this
Event.
-
getArguments
public java.lang.Object[] getArguments()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-