ibspan.tss.agents.rsa.handlers
Class GetRestaurantsDetailsHandler

java.lang.Object
  extended by jade.core.behaviours.Behaviour
      extended by jade.core.behaviours.SimpleBehaviour
          extended by jade.core.behaviours.OneShotBehaviour
              extended by ibspan.tss.messaging.RequestHandler
                  extended by ibspan.tss.agents.rsa.handlers.GetRestaurantsDetailsHandler
All Implemented Interfaces:
Serializable

public class GetRestaurantsDetailsHandler
extends RequestHandler

Author:
Maciej Gawinecki
See Also:
RestaurantServiceAgent, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class jade.core.behaviours.Behaviour
Behaviour.RunnableChangedEvent
 
Field Summary
protected  RestaurantServiceAgent myAgent
           
 
Fields inherited from class jade.core.behaviours.Behaviour
myEvent, NOTIFY_DOWN, NOTIFY_UP, parent, STATE_BLOCKED, STATE_READY, STATE_RUNNING
 
Constructor Summary
GetRestaurantsDetailsHandler(Agent a, DataStore ds, Object requestKey, Object actKey, Object notificationKey)
          Constructs FindRestaurantHandler.
 
Method Summary
protected  ACLMessage prepareResponse(ACLMessage request, Action act)
          Returns response to the request.
 
Methods inherited from class ibspan.tss.messaging.RequestHandler
action
 
Methods inherited from class jade.core.behaviours.OneShotBehaviour
done
 
Methods inherited from class jade.core.behaviours.SimpleBehaviour
reset
 
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
 

Field Detail

myAgent

protected RestaurantServiceAgent myAgent
Constructor Detail

GetRestaurantsDetailsHandler

public GetRestaurantsDetailsHandler(Agent a,
                                    DataStore ds,
                                    Object requestKey,
                                    Object actKey,
                                    Object notificationKey)
Constructs FindRestaurantHandler.

Parameters:
a - owner agent
ds - data store
actKey - key for accessing action of user request from local Data Store
requestKey - key for accessing user request ACL message from local Data Store
notificationKey - key, pointing the place in local Data Store, where result of the Behaviour should put at
Method Detail

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