|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjade.core.behaviours.Behaviour
jade.core.behaviours.CompositeBehaviour
jade.core.behaviours.SerialBehaviour
jade.core.behaviours.FSMBehaviour
ibspan.tss.agents.pa.handlers.PersonalModelConstructor
public abstract class PersonalModelConstructor
This behaviour constructs model of data in Model-View-Controller
architecture.
This class should not be used directly, but extended. As a result of it
action it should, eventually, put constructed DataModel
object
with use of putModel(DataModel)
method or infrom about
InternalSystemError
by calling
putError(InternalSystemError)
method. Returned
DataModel
should contain at least contain
LayoutStructure
object, fetched from
TemplatesRegister
object, provided by the Agent this behaviour
belongs to.
This implementation provides methods for backing up results of their action
and restoring them: backUpResult(Memory)
and
getBackedUpResult()
.
DataModel
,
InternalSystemError
,
LayoutStructure
,
TemplatesRegister
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class jade.core.behaviours.Behaviour |
---|
Behaviour.RunnableChangedEvent |
Field Summary | |
---|---|
protected PersonalAgent |
myAgent
|
protected TemplatesRegister |
templates
|
Fields inherited from class jade.core.behaviours.FSMBehaviour |
---|
currentName, lastStates, previousName |
Fields inherited from class jade.core.behaviours.CompositeBehaviour |
---|
currentExecuted |
Fields inherited from class jade.core.behaviours.Behaviour |
---|
myEvent, NOTIFY_DOWN, NOTIFY_UP, parent, STATE_BLOCKED, STATE_READY, STATE_RUNNING |
Constructor Summary | |
---|---|
PersonalModelConstructor(Agent a,
DataStore ds,
Object requestKey,
Object actKey,
Object actionNameKey,
Object resultNotificationKey)
Constructs PersonalModelConstructor object. |
Method Summary | |
---|---|
protected void |
backUpResult(Memory result)
Puts the given result in local DataStore. |
protected Action |
getAct()
Returns Action concept extracted from the current request. |
protected PA_process_user_request |
getAction()
Returns action concept extracted from current request. |
protected String |
getActionName()
Returns the name of action resolved by action dispatcher for current request. |
protected Memory |
getBackedUpResult()
Returns previously backed-up result. |
protected ACLMessage |
getRequest()
|
protected void |
putError(InternalSystemError error)
Puts the given error in the DataStore in case of constructing failure. |
protected void |
putModel(DataModel model)
Puts the given model in the DataStore as the result of successful constructing. |
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.SerialBehaviour |
---|
handle |
Methods inherited from class jade.core.behaviours.CompositeBehaviour |
---|
action, block, done, registerAsChild, resetChildren, restart, setAgent |
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 |
Field Detail |
---|
protected TemplatesRegister templates
protected PersonalAgent myAgent
Constructor Detail |
---|
public PersonalModelConstructor(Agent a, DataStore ds, Object requestKey, Object actKey, Object actionNameKey, Object resultNotificationKey)
PersonalModelConstructor
object.
a
- is the agent this behaviour belongs to.ds
- is data storerequestKey
- key for accessing user request ACL message from local
DataStoreactKey
- key for accessing action of user request from local DataStoreactionNameKey
- key for accessing action name of user request from local
DataStoreresultNotificationKey
- key in local Data Store, where result of
PersonalModelConstructor behaviour should be put atMethod Detail |
---|
protected void putModel(DataModel model)
model
- is the result model of construction.protected void putError(InternalSystemError error)
error
- is the error encounter during constructing process.protected Action getAct()
protected PA_process_user_request getAction()
protected ACLMessage getRequest()
protected String getActionName()
protected void backUpResult(Memory result)
result
- to be backed-up.protected Memory getBackedUpResult()
null
if backed-up result was
null
or no result has been backed up, yet.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |