org.codehaus.activemq.service
Interface SubscriptionContainer

All Known Implementing Classes:
SubscriptionContainerImpl

public interface SubscriptionContainer

Represents a possibly persistent container of subscription objects

Version:
$Revision: 1.4 $

Method Summary
 void checkForDuplicateDurableSubscription(BrokerClient client, ConsumerInfo info)
          There is only meant to be a single durable subscription open for a given clientID and subscriber name; this method will check to ensure that a user doesn't try to subscribe twice for the same clientID and subscriber name.
 Subscription getSubscription(java.lang.String consumerId)
          Gets the current subscription for the given consumerId if it is available
 Subscription makeSubscription(Dispatcher dispatcher, ConsumerInfo info, Filter filter)
          Creates a subscription (which could be a previous subscription reconecting) and adds it to this container
 Subscription removeSubscription(java.lang.String consumerId)
           
 java.util.Iterator subscriptionIterator()
           
 

Method Detail

getSubscription

public Subscription getSubscription(java.lang.String consumerId)
Gets the current subscription for the given consumerId if it is available

Parameters:
consumerId -
Returns:

removeSubscription

public Subscription removeSubscription(java.lang.String consumerId)

subscriptionIterator

public java.util.Iterator subscriptionIterator()
Returns:
an iterator through the subscriptions

makeSubscription

public Subscription makeSubscription(Dispatcher dispatcher,
                                     ConsumerInfo info,
                                     Filter filter)
Creates a subscription (which could be a previous subscription reconecting) and adds it to this container

Parameters:
dispatcher -
info -
filter -
Returns:

checkForDuplicateDurableSubscription

public void checkForDuplicateDurableSubscription(BrokerClient client,
                                                 ConsumerInfo info)
                                          throws JMSException
There is only meant to be a single durable subscription open for a given clientID and subscriber name; this method will check to ensure that a user doesn't try to subscribe twice for the same clientID and subscriber name.

Parameters:
client -
info -
Throws:
JMSException


Copyright © 2004 Protique, Ltd.. All Rights Reserved.