org.apache.activemq.broker.region
Class TopicRegion

java.lang.Object
  extended by org.apache.activemq.broker.region.AbstractRegion
      extended by org.apache.activemq.broker.region.TopicRegion
All Implemented Interfaces:
Region, Service
Direct Known Subclasses:
ManagedTopicRegion

public class TopicRegion
extends AbstractRegion


Field Summary
protected  java.util.concurrent.ConcurrentHashMap<SubscriptionKey,DurableTopicSubscription> durableSubscriptions
           
 
Fields inherited from class org.apache.activemq.broker.region.AbstractRegion
autoCreateDestinations, broker, consumerChangeMutexMap, destinationFactory, destinationMap, destinations, destinationsMutex, destinationStatistics, started, subscriptions, taskRunnerFactory, usageManager
 
Constructor Summary
TopicRegion(RegionBroker broker, DestinationStatistics destinationStatistics, SystemUsage memoryManager, TaskRunnerFactory taskRunnerFactory, DestinationFactory destinationFactory)
           
 
Method Summary
 Subscription addConsumer(ConnectionContext context, ConsumerInfo info)
          Adds a consumer.
protected  java.util.List<Subscription> addSubscriptionsForDestination(ConnectionContext context, Destination dest)
           
protected  void configureTopic(Topic topic, ActiveMQDestination destination)
           
protected  Subscription createSubscription(ConnectionContext context, ConsumerInfo info)
           
 boolean durableSubscriptionExists(SubscriptionKey key)
           
protected  java.util.Set<ActiveMQDestination> getInactiveDestinations()
           
 boolean isKeepDurableSubsActive()
           
 void removeConsumer(ConnectionContext context, ConsumerInfo info)
          Removes a consumer.
 void removeSubscription(ConnectionContext context, RemoveSubscriptionInfo info)
          Deletes a durable subscription.
 void setKeepDurableSubsActive(boolean keepDurableSubsActive)
           
 java.lang.String toString()
           
 
Methods inherited from class org.apache.activemq.broker.region.AbstractRegion
acknowledge, addDestination, addProducer, createDestination, destroySubscription, dispose, gc, getDestinationMap, getDestinations, getDurableDestinations, getSubscriptions, isAutoCreateDestinations, lookup, messagePull, processConsumerControl, processDispatchNotification, processDispatchNotificationViaDestination, removeDestination, removeProducer, send, setAutoCreateDestinations, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

durableSubscriptions

protected final java.util.concurrent.ConcurrentHashMap<SubscriptionKey,DurableTopicSubscription> durableSubscriptions
Constructor Detail

TopicRegion

public TopicRegion(RegionBroker broker,
                   DestinationStatistics destinationStatistics,
                   SystemUsage memoryManager,
                   TaskRunnerFactory taskRunnerFactory,
                   DestinationFactory destinationFactory)
Method Detail

addConsumer

public Subscription addConsumer(ConnectionContext context,
                                ConsumerInfo info)
                         throws java.lang.Exception
Description copied from interface: Region
Adds a consumer.

Specified by:
addConsumer in interface Region
Overrides:
addConsumer in class AbstractRegion
Parameters:
context - the environment the operation is being executed under.
Returns:
TODO
Throws:
java.lang.Exception - TODO

removeConsumer

public void removeConsumer(ConnectionContext context,
                           ConsumerInfo info)
                    throws java.lang.Exception
Description copied from interface: Region
Removes a consumer.

Specified by:
removeConsumer in interface Region
Overrides:
removeConsumer in class AbstractRegion
Parameters:
context - the environment the operation is being executed under.
Throws:
java.lang.Exception - TODO

removeSubscription

public void removeSubscription(ConnectionContext context,
                               RemoveSubscriptionInfo info)
                        throws java.lang.Exception
Description copied from interface: Region
Deletes a durable subscription.

Specified by:
removeSubscription in interface Region
Overrides:
removeSubscription in class AbstractRegion
Parameters:
context - the environment the operation is being executed under.
info - TODO
Throws:
java.lang.Exception - TODO

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

addSubscriptionsForDestination

protected java.util.List<Subscription> addSubscriptionsForDestination(ConnectionContext context,
                                                                      Destination dest)
                                                               throws java.lang.Exception
Overrides:
addSubscriptionsForDestination in class AbstractRegion
Throws:
java.lang.Exception

configureTopic

protected void configureTopic(Topic topic,
                              ActiveMQDestination destination)

createSubscription

protected Subscription createSubscription(ConnectionContext context,
                                          ConsumerInfo info)
                                   throws javax.jms.JMSException
Specified by:
createSubscription in class AbstractRegion
Throws:
javax.jms.JMSException

getInactiveDestinations

protected java.util.Set<ActiveMQDestination> getInactiveDestinations()
Overrides:
getInactiveDestinations in class AbstractRegion
Returns:
all Destinations that don't have active consumers

isKeepDurableSubsActive

public boolean isKeepDurableSubsActive()

setKeepDurableSubsActive

public void setKeepDurableSubsActive(boolean keepDurableSubsActive)

durableSubscriptionExists

public boolean durableSubscriptionExists(SubscriptionKey key)


Copyright © 2005-2011 FuseSource, Corp.. All Rights Reserved.