fipaos.platform.df
Class SubscriptionManagerTask

java.lang.Object
  |
  +--fipaos.agent.task.Task
        |
        +--fipaos.platform.df.SubscriptionManagerTask

public class SubscriptionManagerTask
extends Task

This Task manages SubscriptionHandlerTask's within a DF


Fields inherited from class fipaos.agent.task.Task
_children, _lock, _owner, _tm
 
Constructor Summary
SubscriptionManagerTask()
          Default constructor
 
Method Summary
 void DFUpdate(AgentManagementAction ama)
          Invoked whenever an update to the DF's database has SUCCESSFULLY completed, causing notification messages to be sent to subscribed Agents
 void doneSubscriptionHandlerTask(Task t)
          Invoked when a SubscriptionHandlerTask completes (i.e.
 void errorSubscriptionHandlerTask(Task t, java.lang.Throwable th)
          Invoked when a SubscriptionHandlerTask fails for some reason - this causes the Task in question to be removed from the list of known SubscriptionHandlerTask's
 void newSubscriber(Conversation conv)
          Causes a SubscriptionHandlerTask to be instantiated to deal with the subscription request from another Agent
 void startTask()
          Invoked when the Task starts - doesn't do anything special
 
Methods inherited from class fipaos.agent.task.Task
DFSearchResults, done, done, doneDFSearchTask, errorDFSearchTask, forward, forward, getContext, getNewConversation, getState, handleAcceptProposal, handleAgree, handleCfp, handleConfirm, handleDisconfirm, handleFailure, handleInform, handleInformIf, handleInformRef, handleLateMessage, handleNotUnderstood, handleOther, handlePropagate, handlePropose, handleProxy, handleQueryIf, handleQueryRef, handleRefuse, handleRejectProposal, handleRequest, handleRequestWhen, handleRequestWhenever, handleSubscribe, handleUndeliverableMessage, newTask, newTask, newTask, newTask, newTask, newTask, newTask, newTask, notify, notifyDone, notifyError, notifyMessageFailure, notifyMessageForEndedConversation, notifyTimeout, searchDF, searchDF, searchDF, searchDF, searchDF, sendNotUnderstood, setContext, timeoutDFSearchTask
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubscriptionManagerTask

public SubscriptionManagerTask()
Default constructor
Method Detail

startTask

public void startTask()
Invoked when the Task starts - doesn't do anything special
Overrides:
startTask in class Task

doneSubscriptionHandlerTask

public void doneSubscriptionHandlerTask(Task t)
Invoked when a SubscriptionHandlerTask completes (i.e. the subscription is cancelled). This causes the Task in question to be removed from the list of known SubscriptionHandlerTask's
Parameters:
t - The Task that has finished

errorSubscriptionHandlerTask

public void errorSubscriptionHandlerTask(Task t,
                                         java.lang.Throwable th)
Invoked when a SubscriptionHandlerTask fails for some reason - this causes the Task in question to be removed from the list of known SubscriptionHandlerTask's
Parameters:
t - Task that has failed
th - Exception associated with failure

newSubscriber

public void newSubscriber(Conversation conv)
Causes a SubscriptionHandlerTask to be instantiated to deal with the subscription request from another Agent
Parameters:
conv - Conversation associated with the subscription

DFUpdate

public void DFUpdate(AgentManagementAction ama)
Invoked whenever an update to the DF's database has SUCCESSFULLY completed, causing notification messages to be sent to subscribed Agents
Parameters:
ama - The AgentManagementAction associated with the event