ibspan.tss.agents.rsa.handlers
Class FindRestaurantHandler
java.lang.Object
jade.core.behaviours.Behaviour
jade.core.behaviours.SimpleBehaviour
jade.core.behaviours.OneShotBehaviour
ibspan.tss.messaging.RequestHandler
ibspan.tss.agents.rsa.handlers.FindRestaurantHandler
- All Implemented Interfaces:
- Serializable
public class FindRestaurantHandler
- extends RequestHandler
This behaviour prepare response with list of restaurants fulfilling
constraints given in the user request.
More precisely, these constrains are given as the map of predicates
(properties mapped into possible values -- one-to-one relation) passed as
UserContext. Property should be defined as resource URI, whereas values as
resource URI or simple literal.
The behaviour should be provided with two OntModel
s: model
describing ontology of Restaurant domain and model containing database with
restaurants to retrieve.
- Author:
- Maciej Gawinecki
- See Also:
RestaurantServiceAgent
,
Serialized Form
Methods inherited from class jade.core.behaviours.Behaviour |
actionWrapper, block, block, getBehaviourName, getDataStore, getExecutionState, getParent, handle, isRunnable, onEnd, onStart, restart, root, setAgent, setBehaviourName, setDataStore, setExecutionState |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_MAX_RESULTS
public static final int DEFAULT_MAX_RESULTS
- See Also:
- Constant Field Values
myAgent
protected RestaurantServiceAgent myAgent
FindRestaurantHandler
public FindRestaurantHandler(Agent a,
DataStore ds,
Object requestKey,
Object actKey,
Object notificationKey)
- Constructs FindRestaurantHandler.
- Parameters:
a
- owner agentds
- data storeactKey
- key for accessing action of user request from local Data StorerequestKey
- key for accessing user request ACL message from local Data
StorenotificationKey
- key, pointing the place in local Data Store, where result of
the Behaviour should put at
prepareResponse
protected final ACLMessage prepareResponse(ACLMessage request,
Action act)
throws FailureException
- Description copied from class:
RequestHandler
- Returns response to the request. Programmers should implenets this method
in order process given request.
- Specified by:
prepareResponse
in class RequestHandler
- Parameters:
request
- is message.act
- is Action
concept extracted previously from
request
object.
- Returns:
- response;
null
means failure.
- Throws:
FailureException