Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.activemq.service.impl
Class SubscriptionContainerImpl

    java.lang.Object
      org.codehaus.activemq.service.impl.SubscriptionContainerImpl

All Implemented Interfaces:
  SubscriptionContainer

Direct Known Subclasses:
  DurableTopicSubscriptionContainerImpl

public class SubscriptionContainerImpl
extends java.lang.Object
implements SubscriptionContainer

A default RAM only implementation of the `SubscriptionContainer`

Version:
  $Revision: 1.1 $

Constructor Summary
`SubscriptionContainerImpl()`
`SubscriptionContainerImpl(java.util.Map subscriptions)`

Method Summary
`void` | `addSubscription(java.lang.String consumerId, Subscription subscription)`
`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.
`protected Subscription` | `createSubscription(Dispatcher dispatcher, ConsumerInfo info, Filter filter)`
`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()`
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### SubscriptionContainerImpl

    public SubscriptionContainerImpl()

### SubscriptionContainerImpl

    public SubscriptionContainerImpl(java.util.Map subscriptions)

Method Detail

### toString

    public java.lang.String toString()

### getSubscription

    public Subscription getSubscription(java.lang.String consumerId)

  Description copied from interface: `SubscriptionContainer`
  Gets the current subscription for the given consumerId if it is available

  Specified by:
    `getSubscription` in interface `SubscriptionContainer`
  Parameters:
    `consumerId` -
  Returns:

### addSubscription

    public void addSubscription(java.lang.String consumerId,
                                Subscription subscription)

### removeSubscription

    public Subscription removeSubscription(java.lang.String consumerId)

  Specified by:
    `removeSubscription` in interface `SubscriptionContainer`

### subscriptionIterator

    public java.util.Iterator subscriptionIterator()

  Specified by:
    `subscriptionIterator` in interface `SubscriptionContainer`
  Returns:
    an iterator through the subscriptions

### makeSubscription

    public Subscription makeSubscription(Dispatcher dispatcher,
                                         ConsumerInfo info,
                                         Filter filter)

  Description copied from interface: `SubscriptionContainer`
  Creates a subscription (which could be a previous subscription reconecting) and adds it to this container

  Specified by:
    `makeSubscription` in interface `SubscriptionContainer`
  Parameters:
    `dispatcher` -
    `info` -
    `filter` -
  Returns:

### checkForDuplicateDurableSubscription

    public void checkForDuplicateDurableSubscription(BrokerClient client,
                                                     ConsumerInfo info)
                                              throws JMSException

  Description copied from interface: `SubscriptionContainer`
  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.

  Specified by:
    `checkForDuplicateDurableSubscription` in interface `SubscriptionContainer`
  Parameters:
    `client` -
    `info` -
  Throws:
    `JMSException`

### createSubscription

    protected Subscription createSubscription(Dispatcher dispatcher,
                                              ConsumerInfo info,
                                              Filter filter)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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