|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A medium to publish and retrieve data to be shared between hsm components whose execution depends on some global memory state (e.g. actions or conditions). As in the interpreter design pattern the context contains information that are global to the interpreter.
Action
,
Interpreter
Method Summary | |
Object |
get(String key)
Returns the object that was associated with a given context key. |
EventBus |
getEventDispatcher()
Returns the event dispatcher associated with the hsm to which the context belongs. |
Event |
getTriggerEvent()
Returns the trigger event. |
void |
set(String key,
Object value)
Associates the specified value with the specified key in the context. |
void |
setEventDispatcher(EventBus dispatcher)
Sets the event dispatcher associated with the hsm to which the context belongs. |
void |
setTriggerEvent(Event trigger)
Sets the trigger event. |
Method Detail |
public Object get(String key)
key
- The key whose associated value is to be returned.
null
if the context
contains no mapping for this key.public void set(String key, Object value)
key
- The key with which the specified value is to be associated.value
- The value to be associated with the specified key.public EventBus getEventDispatcher()
public void setEventDispatcher(EventBus dispatcher)
public Event getTriggerEvent()
public void setTriggerEvent(Event trigger)
trigger
- The trigger event that was responsible for the execution
of the action.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |