ibspan.tss.agents.pa
Class PersonalActionDispatcher
java.lang.Object
jade.core.behaviours.Behaviour
jade.core.behaviours.CompositeBehaviour
jade.core.behaviours.SerialBehaviour
jade.core.behaviours.FSMBehaviour
jade.proto.states.HandlerSelector
ibspan.tss.messaging.SafeHandlerSelector
ibspan.tss.agents.pa.PersonalActionDispatcher
- All Implemented Interfaces:
- Serializable
public class PersonalActionDispatcher
- extends SafeHandlerSelector
Dispatches request to registered behaviour handlers. More precisely, For user
request returns the key reflecting the name of action the user is wishing to
be executed by the system; more precisely, it is the name of
actionName
parameter in incoming request. For example, the the
following content of a requuest:
(action (agent-identifier :name pa-1)
(PA-process-user-request
:actionName "find-restaurant"
....
)
)
results in returning the following key: find-restaurant
which,
of course, must be bounded with the Behaviour realizing the user request.
- Author:
- Maciej Gawinecki
- See Also:
ActionDispatcher
,
ActionDispatcherWithSessionTracking
,
PAResponder
,
Serialized Form
Methods inherited from class jade.core.behaviours.FSMBehaviour |
checkTermination, deregisterState, forceTransitionTo, getChildren, getCurrent, getLastExitValue, getName, getPrevious, getState, handleInconsistentFSM, handleStateEntered, onEnd, registerDefaultTransition, registerDefaultTransition, registerFirstState, registerLastState, registerState, registerTransition, registerTransition, reset, resetStates, scheduleFirst, scheduleNext |
Methods inherited from class jade.core.behaviours.Behaviour |
actionWrapper, block, getBehaviourName, getDataStore, getExecutionState, getParent, isRunnable, onStart, root, setBehaviourName, setDataStore, setExecutionState |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PersonalActionDispatcher
public PersonalActionDispatcher(Agent a,
DataStore ds,
Object accessKey,
Object actionNameKey,
Object actKey)
- Constructs action dispatcher.
- Parameters:
a
- is a reference to the Agent object.ds
- is DataStore which will be used locally.accessKey
- is the key to get the proper object from the DataStore, this
is the object that will be later passed as argument to the
method getSelectionKey
.actionNameKey
- is the key to get the name of action resolved by this action
dispatcher.actKey
- is the key in the DataStore to access Action
from
current request, extracted by this action dispatcher.- See Also:
SafeHandlerSelector.getSelectionKey(Object)
getSelectionKey_internal
protected final Object getSelectionKey_internal(Object o)
- Description copied from class:
SafeHandlerSelector
- Subclasses must provide a concrete implementation for this method. It
must return the key to which the handler was bound.
- Specified by:
getSelectionKey_internal
in class SafeHandlerSelector
- Returns:
- the key to which the handler was bound