|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjadex.application.space.envsupport.environment.ComponentActionList
public class ComponentActionList
The list of scheduled component actions and convenience methods for executing selected actions. This implementation is not thread-safe, i.e. methods should only be called from threads that are already synchronized with the environment space monitor.
| Nested Class Summary | |
|---|---|
static class |
ComponentActionList.ActionEntry
Entry for a scheduled action. |
| Field Summary | |
|---|---|
protected Set |
actions
The scheduled actions. |
protected ICommand |
cmd
The schedule command. |
protected Collection |
executed
The executed actions where actors still need to be woken up. |
protected IEnvironmentSpace |
space
The environment space. |
| Constructor Summary | |
|---|---|
ComponentActionList(IEnvironmentSpace space)
Create a new action list. |
|
| Method Summary | |
|---|---|
void |
addComponentAction(ComponentActionList.ActionEntry entry)
Add an component action. |
void |
executeActions(IFilter filter,
boolean wakeup)
Should be called on environment thread only. |
ComponentActionList.ActionEntry[] |
getActionEntries()
Get the queued entries, which have not yet been executed. |
void |
removeComponentAction(ComponentActionList.ActionEntry entry)
Remove an component action. |
void |
scheduleComponentAction(ISpaceAction action,
Map parameters,
IResultListener listener)
Schedules an component action. |
void |
setOrdering(Comparator comp)
Set an ordering used for executing actions. |
void |
setScheduleCommand(ICommand cmd)
Set the schedule command to be invoked, when an action should be scheduled. |
void |
wakeupComponents(IFilter filter)
Should be called on environment thread only. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected IEnvironmentSpace space
protected Set actions
protected Collection executed
protected ICommand cmd
| Constructor Detail |
|---|
public ComponentActionList(IEnvironmentSpace space)
| Method Detail |
|---|
public void scheduleComponentAction(ISpaceAction action,
Map parameters,
IResultListener listener)
action - The action.parameters - parameters for the action (may be null)listener - the result listenerpublic void addComponentAction(ComponentActionList.ActionEntry entry)
entry - The action entry.public void removeComponentAction(ComponentActionList.ActionEntry entry)
entry - The action entry.public ComponentActionList.ActionEntry[] getActionEntries()
public void setOrdering(Comparator comp)
comp - The comparator representing the ordering.
public void executeActions(IFilter filter,
boolean wakeup)
filter - A filter to select only a subset of actions (or null for all actions).wakeup - Immediately wake up each calling component after its action has been executed
(otherwise wakeupComponents() has to be called separately).public void wakeupComponents(IFilter filter)
filter - A filter to select only a subset of actions (or null for all actions).
(otherwise wakeupComponents() has to be called separately).public void setScheduleCommand(ICommand cmd)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||