org.apache.activemq.broker.region
Interface Region

All Superinterfaces:
Service
All Known Subinterfaces:
Broker
All Known Implementing Classes:
AbstractRegion, AbstractTempRegion, AdvisoryBroker, AuthorizationBroker, BrokerBroadcaster, BrokerFilter, BrokerPluginSupport, CompositeDestinationBroker, ConnectionDotFileInterceptor, ConnectionSplitBroker, DestinationDotFileInterceptor, DestinationPathSeparatorBroker, DiscardingDLQBroker, DotFileInterceptorSupport, EmptyBroker, ErrorBroker, ForcePersistencyModeBroker, InsertableMutableBrokerFilter, JaasAuthenticationBroker, JaasCertificateAuthenticationBroker, JaasDualAuthenticationBroker, LoggingBrokerPlugin, ManagedQueueRegion, ManagedRegionBroker, ManagedTempQueueRegion, ManagedTempTopicRegion, ManagedTopicRegion, MasterBroker, MulticastTraceBrokerPlugin, MutableBrokerFilter, QueueRegion, RegionBroker, SchedulerBroker, SimpleAuthenticationBroker, StatisticsBroker, TempQueueRegion, TempTopicRegion, TimeStampingBrokerPlugin, TopicRegion, TraceBrokerPathPlugin, TransactionBroker, UDPTraceBrokerPlugin, UserIDBroker

public interface Region
extends Service

A Region is used to implement the different QOS options available to a broker. A Broker is composed of multiple message processing Regions that provide different QOS options.


Method Summary
 void acknowledge(ConsumerBrokerExchange consumerExchange, MessageAck ack)
          Used to acknowledge the receipt of a message by a client.
 Subscription addConsumer(ConnectionContext context, ConsumerInfo info)
          Adds a consumer.
 Destination addDestination(ConnectionContext context, ActiveMQDestination destination, boolean createIfTemporary)
          Used to create a destination.
 void addProducer(ConnectionContext context, ProducerInfo info)
          Adds a Producer.
 void gc()
           
 java.util.Map<ActiveMQDestination,Destination> getDestinationMap()
          Returns a copy of the current destinations available in the region
 java.util.Set<Destination> getDestinations(ActiveMQDestination destination)
          Provide an exact or wildcard lookup of destinations in the region
 Response messagePull(ConnectionContext context, MessagePull pull)
          Allows a consumer to pull a message from a queue
 void processConsumerControl(ConsumerBrokerExchange consumerExchange, ConsumerControl control)
           
 void processDispatchNotification(MessageDispatchNotification messageDispatchNotification)
          Process a notification of a dispatch - used by a Slave Broker
 void removeConsumer(ConnectionContext context, ConsumerInfo info)
          Removes a consumer.
 void removeDestination(ConnectionContext context, ActiveMQDestination destination, long timeout)
          Used to destroy a destination.
 void removeProducer(ConnectionContext context, ProducerInfo info)
          Removes a Producer.
 void removeSubscription(ConnectionContext context, RemoveSubscriptionInfo info)
          Deletes a durable subscription.
 void send(ProducerBrokerExchange producerExchange, Message message)
          Send a message to the broker to using the specified destination.
 
Methods inherited from interface org.apache.activemq.Service
start, stop
 

Method Detail

addDestination

Destination addDestination(ConnectionContext context,
                           ActiveMQDestination destination,
                           boolean createIfTemporary)
                           throws java.lang.Exception
Used to create a destination. Usually, this method is invoked as a side-effect of sending a message to a destination that does not exist yet.

Parameters:
context -
destination - the destination to create.
createIfTemporary -
Returns:
TODO
Throws:
java.lang.Exception - TODO

removeDestination

void removeDestination(ConnectionContext context,
                       ActiveMQDestination destination,
                       long timeout)
                       throws java.lang.Exception
Used to destroy a destination. This should try to quiesce use of the destination up to the timeout allotted time before removing the destination. This will remove all persistent messages associated with the destination.

Parameters:
context - the environment the operation is being executed under.
destination - what is being removed from the broker.
timeout - the max amount of time to wait for the destination to quiesce
Throws:
java.lang.Exception - TODO

getDestinationMap

java.util.Map<ActiveMQDestination,Destination> getDestinationMap()
Returns a copy of the current destinations available in the region

Returns:
a copy of the regions currently active at the time of the call with the key the destination and the value the Destination.

addConsumer

Subscription addConsumer(ConnectionContext context,
                         ConsumerInfo info)
                         throws java.lang.Exception
Adds a consumer.

Parameters:
context - the environment the operation is being executed under.
Returns:
TODO
Throws:
java.lang.Exception - TODO

removeConsumer

void removeConsumer(ConnectionContext context,
                    ConsumerInfo info)
                    throws java.lang.Exception
Removes a consumer.

Parameters:
context - the environment the operation is being executed under.
Throws:
java.lang.Exception - TODO

addProducer

void addProducer(ConnectionContext context,
                 ProducerInfo info)
                 throws java.lang.Exception
Adds a Producer.

Parameters:
context - the environment the operation is being executed under.
Throws:
java.lang.Exception - TODO

removeProducer

void removeProducer(ConnectionContext context,
                    ProducerInfo info)
                    throws java.lang.Exception
Removes a Producer.

Parameters:
context - the environment the operation is being executed under.
Throws:
java.lang.Exception - TODO

removeSubscription

void removeSubscription(ConnectionContext context,
                        RemoveSubscriptionInfo info)
                        throws java.lang.Exception
Deletes a durable subscription.

Parameters:
context - the environment the operation is being executed under.
info - TODO
Throws:
java.lang.Exception - TODO

send

void send(ProducerBrokerExchange producerExchange,
          Message message)
          throws java.lang.Exception
Send a message to the broker to using the specified destination. The destination specified in the message does not need to match the destination the message is sent to. This is handy in case the message is being sent to a dead letter destination.

Parameters:
producerExchange - the environment the operation is being executed under.
message -
Throws:
java.lang.Exception - TODO

acknowledge

void acknowledge(ConsumerBrokerExchange consumerExchange,
                 MessageAck ack)
                 throws java.lang.Exception
Used to acknowledge the receipt of a message by a client.

Parameters:
consumerExchange - the environment the operation is being executed under.
Throws:
java.lang.Exception - TODO

messagePull

Response messagePull(ConnectionContext context,
                     MessagePull pull)
                     throws java.lang.Exception
Allows a consumer to pull a message from a queue

Throws:
java.lang.Exception

processDispatchNotification

void processDispatchNotification(MessageDispatchNotification messageDispatchNotification)
                                 throws java.lang.Exception
Process a notification of a dispatch - used by a Slave Broker

Parameters:
messageDispatchNotification -
Throws:
java.lang.Exception - TODO

gc

void gc()

getDestinations

java.util.Set<Destination> getDestinations(ActiveMQDestination destination)
Provide an exact or wildcard lookup of destinations in the region

Returns:
a set of matching destination objects.

processConsumerControl

void processConsumerControl(ConsumerBrokerExchange consumerExchange,
                            ConsumerControl control)


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