ibspan.tss.agents.pa
Class PersonalAgent
java.lang.Object
jade.core.Agent
ibspan.tss.agents.SystemAgent
ibspan.tss.agents.pa.PersonalAgent
- All Implemented Interfaces:
- TimerListener, Serializable, Runnable
public final class PersonalAgent
- extends SystemAgent
This is class of an agent which works in the system on behalf of its user. It
realizes requests of authorized users, forwarded to it by
SessionHandlingAgent
. The agent requires the following
services accesible in the system to start:
- service of
RestaurantServiceAgent
for searching
restaurants according to the user preferences
- service of
ProfileManagingAgent
to obtain its user
profile -- necessary for filtering searching results.
This agent is created on call by SessionHanadlingAgent
and
requires two arguments defined, when created: ID and name of
its user.
- Author:
- Maciej Gawinecki
- See Also:
ibspan.tss.agent.sha.SessionHandlingAgent
,
RestaurantServiceAgent
,
ProfileManagingAgent
,
Serialized Form
Fields inherited from class jade.core.Agent |
AP_ACTIVE, AP_DELETED, AP_IDLE, AP_INITIATED, AP_MAX, AP_MIN, AP_SUSPENDED, AP_WAITING, D_ACTIVE, D_MAX, D_MIN, D_RETIRED, D_SUSPENDED, D_UNKNOWN |
Methods inherited from class jade.core.Agent |
addBehaviour, afterClone, afterMove, beforeClone, beforeMove, blockingReceive, blockingReceive, blockingReceive, blockingReceive, changeStateTo, clean, doActivate, doClone, doDelete, doMove, doSuspend, doTimeOut, doWait, doWait, doWake, getAgentState, getAID, getAMS, getArguments, getContainerController, getContentManager, getCurQueueSize, getDefaultDF, getHap, getHelper, getLocalName, getName, getO2AObject, getProperty, getQueueSize, getState, here, notifyChangeBehaviourState, notifyRestarted, postMessage, putBack, putO2AObject, receive, receive, removeBehaviour, restartLater, restore, restoreBufferedState, run, send, setArguments, setEnabledO2ACommunication, setGenerateBehaviourEvents, setQueueSize, waitUntilStarted, write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SERVICE_NAME
public static final String SERVICE_NAME
- See Also:
- Constant Field Values
SERVICE_TYPE
public static final String SERVICE_TYPE
- See Also:
- Constant Field Values
SERVICE_OWNERSHIP
public static final String SERVICE_OWNERSHIP
- See Also:
- Constant Field Values
USER_ID_PARAM_KEY
public static final String USER_ID_PARAM_KEY
- See Also:
- Constant Field Values
NAME_PREFIX
public static final String NAME_PREFIX
- See Also:
- Constant Field Values
PersonalAgent
public PersonalAgent()
getTemplatesDBModel
public OntModel getTemplatesDBModel()
getTemplates
public TemplatesRegister getTemplates()
getRestaurantService
public ServiceFinder getRestaurantService()
getProfileService
public ServiceFinder getProfileService()
getMyUserProfile
public UserProfile getMyUserProfile()
getMyUserID
public int getMyUserID()
getDomainModel
public OntModel getDomainModel()
setup
public void setup()
- Description copied from class:
SystemAgent
- Loads configuration from properties file for this agent and passes it to
SystemAgent.activateProperties(Properties)
. Property file is given as the first
argument for the launched agent. The programmer is encouraged to call
this method in her agent's setup()
method.
- Overrides:
setup
in class SystemAgent
activateProperties
protected void activateProperties(Properties conf)
- Description copied from class:
SystemAgent
- Activates configuration by processing given properties.
- Specified by:
activateProperties
in class SystemAgent
- Parameters:
conf
- are properties of the agent.
getServiceDescription
public static ServiceDescription getServiceDescription()
takeDown
protected void takeDown()
- Overrides:
takeDown
in class Agent