Package jade.proto
Class SubscriptionResponder.Subscription
- java.lang.Object
-
- jade.proto.SubscriptionResponder.Subscription
-
- Enclosing class:
- SubscriptionResponder
public static class SubscriptionResponder.Subscription extends Object
Inner calss SubscriptionThis class represents a subscription. When a notification has to be sent to a subscribed agent the notification message should not be directly sent to the subscribed agent, but should be passed to the
Subscriptionobject representing the subscription of that agent by means of itsnotify()method. This automatically handles sequencing and protocol fields appropriately.Subscriptionobjects must be created by means of thecreateSubscription()method.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()This method removes the current Subscription object from the SubscriptionResponder internal tables.booleanequals(Object obj)ACLMessagegetMessage()Retrieve the ACL message with which this subscription object was created.inthashCode()voidnotify(ACLMessage notification)This method allows sending back a notification message to the subscribed agent associated to thisSubscriptionobject.
-
-
-
Method Detail
-
getMessage
public ACLMessage getMessage()
Retrieve the ACL message with which this subscription object was created.- Returns:
- the subscription message corresponding to this
Subscription
-
notify
public void notify(ACLMessage notification)
This method allows sending back a notification message to the subscribed agent associated to thisSubscriptionobject. The user should call this method, instead of directly using thesend()method of theAgentclass, as it automatically handles sequencing and protocol fields appropriately.
-
close
public void close()
This method removes the current Subscription object from the SubscriptionResponder internal tables.
-
-