fipaos.platform.df
Class SubscriptionManagerTask

fipaos.agent.task.Task
  |
  +--fipaos.platform.df.SubscriptionManagerTask

public class SubscriptionManagerTask
extends Task
implements SubscriptionManager

This Task manages SubscriptionHandlerTask's within a DF


Constructor Summary
SubscriptionManagerTask()
          Default constructor

Method Summary
 voidDFUpdate(AgentManagementAction ama)
          Invoked whenever an update to the DF's database has SUCCESSFULLY completed, causing
notification messages to be sent to subscribed Agents
 voiddoneSubscriptionHandlerTask(Task t)
          Invoked when a SubscriptionHandlerTask completes (i.e.
 voiderrorSubscriptionHandlerTask(Task t, 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
 voidhandleOther(Conversation conv)
          Invoked when the DF agent receives a subscription related message
 voidnewSubscriber(fipaos.ont.fipa.ACL acl)
          Causes a SubscriptionHandlerTask to be instantiated to deal with the subscription
request from another Agent
 voidstartTask()
          Invoked when the Task starts - doesn't do anything special

Methods inherited from class fipaos.agent.task.Task
doneDFSearchTask, endTask, errorDFSearchTask, getContext, getState, handleAcceptProposal, handleAgree, handleCfp, handleConfirm, handleDisconfirm, handleFailure, handleInform, handleInformIf, handleInformRef, handleLateMessage, handleNotUnderstood, handlePropagate, handlePropose, handleProxy, handleQueryIf, handleQueryRef, handleRefuse, handleRejectProposal, handleRequest, handleRequestWhen, handleRequestWhenever, handleSubscribe, handleUndeliverableMessage, notify, notifyMessageFailure, notifyMessageForEndedConversation, setContext, timeoutDFSearchTask

Constructor Detail

SubscriptionManagerTask

public SubscriptionManagerTask()
Default constructor
Method Detail

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

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, 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

handleOther

public void handleOther(Conversation conv)
Invoked when the DF agent receives a subscription related message
Parameters:
conv - The updated conversation

newSubscriber

public void newSubscriber(fipaos.ont.fipa.ACL acl)
Causes a SubscriptionHandlerTask to be instantiated to deal with the subscription
request from another Agent
Parameters:
acl - First ACL message of the subscription

startTask

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

Association Links

to Class java.util.List

List of active subscriptions.

to Class java.lang.Object

Dependency Links

to Class fipaos.platform.df.SubscriptionHandlerTask

link dependency