org.apache.mina.statemachine.event
Class Event

java.lang.Object
  extended by org.apache.mina.statemachine.event.Event

public class Event
extends Object

Represents 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.

Author:
Apache MINA Project

Field Summary
static String WILDCARD_EVENT_ID
           
 
Constructor Summary
Event(Object id, StateContext context)
          Creates a new Event with the specified id and no arguments.
Event(Object id, StateContext context, Object[] arguments)
          Creates a new Event with the specified id and arguments.
 
Method Summary
 Object[] getArguments()
          Returns the arguments of this Event.
 StateContext getContext()
          Returns the StateContext this Event was triggered for.
 Object getId()
          Returns the id of this Event.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

WILDCARD_EVENT_ID

public static final String WILDCARD_EVENT_ID
See Also:
Constant Field Values
Constructor Detail

Event

public Event(Object id,
             StateContext context)
Creates a new Event with the specified id and no arguments.

Parameters:
id - the event id.
context - the StateContext the event was triggered for.

Event

public Event(Object id,
             StateContext context,
             Object[] arguments)
Creates a new Event with the specified id and arguments.

Parameters:
id - the event id.
context - the StateContext the event was triggered for.
arguments - the event arguments.
Method Detail

getContext

public StateContext getContext()
Returns the StateContext this Event was triggered for.

Returns:
the StateContext.

getId

public Object getId()
Returns the id of this Event.

Returns:
the id.

getArguments

public Object[] getArguments()
Returns the arguments of this Event.

Returns:
the arguments. Returns an empty array if this Event has no arguments.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2004-2012 Apache MINA Project. All Rights Reserved.