jade.proto
Interface SubscriptionResponder.SubscriptionManager

Enclosing interface:
SubscriptionResponder

public static interface SubscriptionResponder.SubscriptionManager

Inner interface SubscriptionManager.

A SubscriptionResponder only deals with enforcing and controlling the sequence of messages in a subscription conversation, while it delegates the registration/deregistration of subscriptions and the creation of notifications when required to a SubscriptionManager object that is passed as parameter in the constructor. When a new subscription message arrives, the SubscriptionResponder just calls the register() method of its SubscriptionManager. The user is expected to provide a class that implements the register() and deregister() methods appropriately.


Method Summary
 boolean deregister(SubscriptionResponder.Subscription s)
          Deregister a Subscription object
 boolean register(SubscriptionResponder.Subscription s)
          Register a new Subscription object
 

Method Detail

register

public boolean register(SubscriptionResponder.Subscription s)
                 throws RefuseException,
                        NotUnderstoodException
Register a new Subscription object

Parameters:
s - The Subscription object to be registered
Returns:
The boolean value returned by this method provides an indication to the SubscriptionResponder about whether or not an AGREE message should be sent back to the initiator. The default implementation of the prepareResponse method of the SubscriptionResponder ignores this indication, but programmers can override it.
RefuseException
NotUnderstoodException

deregister

public boolean deregister(SubscriptionResponder.Subscription s)
                   throws FailureException
Deregister a Subscription object

Returns:
The boolean value returned by this method provides an indication to the SubscriptionResponder about whether or not an INFORM message should be sent back to the initiator. The default implementation of the handleCancel() method of the SubscriptionResponder ignores this indication, but programmers can override it.
FailureException


JADE