|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.activemq.broker.region.RegionBroker
public class RegionBroker
Routes Broker operations to the correct messaging regions for processing.
Field Summary | |
---|---|
protected edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap |
connectionStates
|
protected DestinationFactory |
destinationFactory
|
protected DestinationStatistics |
destinationStatistics
|
Constructor Summary | |
---|---|
RegionBroker(BrokerService brokerService,
TaskRunnerFactory taskRunnerFactory,
UsageManager memoryManager,
DestinationFactory destinationFactory,
DestinationInterceptor destinationInterceptor)
|
Method Summary | |
---|---|
void |
acknowledge(ConnectionContext context,
MessageAck ack)
Used to acknowledge the receipt of a message by a client. |
void |
addBroker(Connection connection,
BrokerInfo info)
A remote Broker connects |
void |
addConnection(ConnectionContext context,
ConnectionInfo info)
A client is establishing a connection with the broker. |
Subscription |
addConsumer(ConnectionContext context,
ConsumerInfo info)
Adds a consumer. |
Destination |
addDestination(ConnectionContext context,
ActiveMQDestination destination)
Used to create a destination. |
void |
addDestinationInfo(ConnectionContext context,
DestinationInfo info)
Add and process a DestinationInfo object |
void |
addProducer(ConnectionContext context,
ProducerInfo info)
Adds a producer. |
void |
addSession(ConnectionContext context,
SessionInfo info)
Adds a session. |
void |
beginTransaction(ConnectionContext context,
TransactionId xid)
Starts a transaction. |
void |
commitTransaction(ConnectionContext context,
TransactionId xid,
boolean onePhase)
Commits a transaction. |
protected Region |
createQueueRegion(UsageManager memoryManager,
TaskRunnerFactory taskRunnerFactory,
DestinationFactory destinationFactory)
|
protected Region |
createTempQueueRegion(UsageManager memoryManager,
TaskRunnerFactory taskRunnerFactory,
DestinationFactory destinationFactory)
|
protected Region |
createTempTopicRegion(UsageManager memoryManager,
TaskRunnerFactory taskRunnerFactory,
DestinationFactory destinationFactory)
|
protected Region |
createTopicRegion(UsageManager memoryManager,
TaskRunnerFactory taskRunnerFactory,
DestinationFactory destinationFactory)
|
protected javax.jms.JMSException |
createUnknownDestinationTypeException(ActiveMQDestination destination)
|
protected void |
doStop(ServiceStopper ss)
|
void |
forgetTransaction(ConnectionContext context,
TransactionId transactionId)
Forgets a transaction. |
void |
gc()
|
Broker |
getAdaptor(java.lang.Class type)
Get a Broker from the Broker Stack that is a particular class |
ConnectionContext |
getAdminConnectionContext()
|
BrokerId |
getBrokerId()
Get the id of the broker |
java.lang.String |
getBrokerName()
Get the name of the broker |
Connection[] |
getClients()
|
java.util.Map |
getConnectionStates()
|
DestinationInterceptor |
getDestinationInterceptor()
|
java.util.Map |
getDestinationMap()
Returns a copy of the current destinations available in the region |
PolicyMap |
getDestinationPolicy()
|
ActiveMQDestination[] |
getDestinations()
|
java.util.Set |
getDestinations(ActiveMQDestination destination)
Provide an exact or wildcard lookup of destinations in the region |
DestinationStatistics |
getDestinationStatistics()
|
java.util.Set |
getDurableDestinations()
|
BrokerInfo[] |
getPeerBrokerInfos()
Get the BrokerInfo's of any connected Brokers |
PendingDurableSubscriberMessageStoragePolicy |
getPendingDurableSubscriberPolicy()
|
TransactionId[] |
getPreparedTransactions(ConnectionContext context)
Gets a list of all the prepared xa transactions. |
Region |
getQueueRegion()
|
Store |
getTempDataStore()
|
Region |
getTempQueueRegion()
|
Region |
getTempTopicRegion()
|
Region |
getTopicRegion()
|
protected boolean |
isEqual(ConnectionId connectionId,
ConnectionId connectionId2)
|
boolean |
isFaultTolerantConfiguration()
|
boolean |
isKeepDurableSubsActive()
|
boolean |
isSlaveBroker()
|
boolean |
isStopped()
|
Response |
messagePull(ConnectionContext context,
MessagePull pull)
Allows a consumer to pull a message from a queue |
int |
prepareTransaction(ConnectionContext context,
TransactionId xid)
Prepares a transaction. |
void |
processDispatch(MessageDispatch messageDispatch)
Notify the Broker that a dispatch has happened |
void |
processDispatchNotification(MessageDispatchNotification messageDispatchNotification)
Process a notification of a dispatch - used by a Slave Broker |
void |
removeBroker(Connection connection,
BrokerInfo info)
Remove a BrokerInfo |
void |
removeConnection(ConnectionContext context,
ConnectionInfo info,
java.lang.Throwable error)
A client is disconnecting from the broker. |
void |
removeConsumer(ConnectionContext context,
ConsumerInfo info)
Removes a consumer. |
void |
removeDestination(ConnectionContext context,
ActiveMQDestination destination,
long timeout)
Used to destroy a destination. |
void |
removeDestinationInfo(ConnectionContext context,
DestinationInfo info)
Remove and process a DestinationInfo object |
void |
removeProducer(ConnectionContext context,
ProducerInfo info)
Removes a producer. |
void |
removeSession(ConnectionContext context,
SessionInfo info)
Removes a session. |
void |
removeSubscription(ConnectionContext context,
RemoveSubscriptionInfo info)
Deletes a durable subscription. |
void |
rollbackTransaction(ConnectionContext context,
TransactionId xid)
Rollsback a transaction. |
void |
send(ConnectionContext context,
Message message)
Send a message to the broker to using the specified destination. |
void |
setAdminConnectionContext(ConnectionContext adminConnectionContext)
Sets the default administration connection context used when configuring the broker on startup or via JMX |
void |
setBrokerId(BrokerId brokerId)
|
void |
setBrokerName(java.lang.String brokerName)
|
void |
setKeepDurableSubsActive(boolean keepDurableSubsActive)
|
void |
setPendingDurableSubscriberPolicy(PendingDurableSubscriberMessageStoragePolicy durableSubscriberCursor)
|
void |
start()
|
void |
stop()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final DestinationStatistics destinationStatistics
protected DestinationFactory destinationFactory
protected final edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap connectionStates
Constructor Detail |
---|
public RegionBroker(BrokerService brokerService, TaskRunnerFactory taskRunnerFactory, UsageManager memoryManager, DestinationFactory destinationFactory, DestinationInterceptor destinationInterceptor) throws java.io.IOException
java.io.IOException
Method Detail |
---|
public java.util.Map getDestinationMap()
Region
getDestinationMap
in interface Region
public java.util.Set getDestinations(ActiveMQDestination destination)
Region
getDestinations
in interface Region
public Broker getAdaptor(java.lang.Class type)
Broker
getAdaptor
in interface Broker
public Region getQueueRegion()
public Region getTempQueueRegion()
public Region getTempTopicRegion()
public Region getTopicRegion()
protected Region createTempTopicRegion(UsageManager memoryManager, TaskRunnerFactory taskRunnerFactory, DestinationFactory destinationFactory)
protected Region createTempQueueRegion(UsageManager memoryManager, TaskRunnerFactory taskRunnerFactory, DestinationFactory destinationFactory)
protected Region createTopicRegion(UsageManager memoryManager, TaskRunnerFactory taskRunnerFactory, DestinationFactory destinationFactory)
protected Region createQueueRegion(UsageManager memoryManager, TaskRunnerFactory taskRunnerFactory, DestinationFactory destinationFactory)
public void start() throws java.lang.Exception
start
in interface Service
java.lang.Exception
public void stop() throws java.lang.Exception
stop
in interface Service
java.lang.Exception
public PolicyMap getDestinationPolicy()
public void addConnection(ConnectionContext context, ConnectionInfo info) throws java.lang.Exception
Broker
addConnection
in interface Broker
java.lang.Exception
- TODOpublic void removeConnection(ConnectionContext context, ConnectionInfo info, java.lang.Throwable error) throws java.lang.Exception
Broker
removeConnection
in interface Broker
context
- the environment the operation is being executed under.error
- null if the client requested the disconnect or the error that caused the client to disconnect.
java.lang.Exception
- TODOprotected boolean isEqual(ConnectionId connectionId, ConnectionId connectionId2)
public Connection[] getClients() throws java.lang.Exception
getClients
in interface Broker
java.lang.Exception
- TODOpublic Destination addDestination(ConnectionContext context, ActiveMQDestination destination) throws java.lang.Exception
Region
addDestination
in interface Region
destination
- the destination to create.
java.lang.Exception
- TODOpublic void removeDestination(ConnectionContext context, ActiveMQDestination destination, long timeout) throws java.lang.Exception
Region
removeDestination
in interface Region
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
java.lang.Exception
- TODOpublic void addDestinationInfo(ConnectionContext context, DestinationInfo info) throws java.lang.Exception
Broker
addDestinationInfo
in interface Broker
java.lang.Exception
public void removeDestinationInfo(ConnectionContext context, DestinationInfo info) throws java.lang.Exception
Broker
removeDestinationInfo
in interface Broker
java.lang.Exception
public ActiveMQDestination[] getDestinations() throws java.lang.Exception
getDestinations
in interface Broker
java.lang.Exception
- TODOpublic void addSession(ConnectionContext context, SessionInfo info) throws java.lang.Exception
Broker
addSession
in interface Broker
java.lang.Exception
- TODOpublic void removeSession(ConnectionContext context, SessionInfo info) throws java.lang.Exception
Broker
removeSession
in interface Broker
java.lang.Exception
- TODOpublic void addProducer(ConnectionContext context, ProducerInfo info) throws java.lang.Exception
Broker
addProducer
in interface Broker
context
- the enviorment the operation is being executed under.
java.lang.Exception
- TODOpublic void removeProducer(ConnectionContext context, ProducerInfo info) throws java.lang.Exception
Broker
removeProducer
in interface Broker
context
- the enviorment the operation is being executed under.
java.lang.Exception
- TODOpublic Subscription addConsumer(ConnectionContext context, ConsumerInfo info) throws java.lang.Exception
Region
addConsumer
in interface Region
context
- the environment the operation is being executed under.
java.lang.Exception
- TODOpublic void removeConsumer(ConnectionContext context, ConsumerInfo info) throws java.lang.Exception
Region
removeConsumer
in interface Region
context
- the environment the operation is being executed under.
java.lang.Exception
- TODOpublic void removeSubscription(ConnectionContext context, RemoveSubscriptionInfo info) throws java.lang.Exception
Region
removeSubscription
in interface Region
context
- the environment the operation is being executed under.info
- TODO
java.lang.Exception
- TODOpublic void send(ConnectionContext context, Message message) throws java.lang.Exception
Region
send
in interface Region
context
- the environment the operation is being executed under.
java.lang.Exception
- TODOpublic void acknowledge(ConnectionContext context, MessageAck ack) throws java.lang.Exception
Region
acknowledge
in interface Region
context
- the environment the operation is being executed under.
java.lang.Exception
- TODOpublic Response messagePull(ConnectionContext context, MessagePull pull) throws java.lang.Exception
Region
messagePull
in interface Region
java.lang.Exception
public TransactionId[] getPreparedTransactions(ConnectionContext context) throws java.lang.Exception
Broker
getPreparedTransactions
in interface Broker
java.lang.Exception
- TODOpublic void beginTransaction(ConnectionContext context, TransactionId xid) throws java.lang.Exception
Broker
beginTransaction
in interface Broker
java.lang.Exception
- TODOpublic int prepareTransaction(ConnectionContext context, TransactionId xid) throws java.lang.Exception
Broker
prepareTransaction
in interface Broker
java.lang.Exception
- TODOpublic void rollbackTransaction(ConnectionContext context, TransactionId xid) throws java.lang.Exception
Broker
rollbackTransaction
in interface Broker
java.lang.Exception
- TODOpublic void commitTransaction(ConnectionContext context, TransactionId xid, boolean onePhase) throws java.lang.Exception
Broker
commitTransaction
in interface Broker
java.lang.Exception
- TODOpublic void forgetTransaction(ConnectionContext context, TransactionId transactionId) throws java.lang.Exception
Broker
forgetTransaction
in interface Broker
java.lang.Exception
- TODOpublic void gc()
gc
in interface Region
public BrokerId getBrokerId()
Broker
getBrokerId
in interface Broker
public void setBrokerId(BrokerId brokerId)
public java.lang.String getBrokerName()
Broker
getBrokerName
in interface Broker
public void setBrokerName(java.lang.String brokerName)
public DestinationStatistics getDestinationStatistics()
protected javax.jms.JMSException createUnknownDestinationTypeException(ActiveMQDestination destination)
public void addBroker(Connection connection, BrokerInfo info)
Broker
addBroker
in interface Broker
public void removeBroker(Connection connection, BrokerInfo info)
Broker
removeBroker
in interface Broker
public BrokerInfo[] getPeerBrokerInfos()
Broker
getPeerBrokerInfos
in interface Broker
public void processDispatch(MessageDispatch messageDispatch)
Broker
processDispatch
in interface Broker
public void processDispatchNotification(MessageDispatchNotification messageDispatchNotification) throws java.lang.Exception
Region
processDispatchNotification
in interface Region
java.lang.Exception
- TODOpublic boolean isSlaveBroker()
isSlaveBroker
in interface Broker
public boolean isStopped()
isStopped
in interface Broker
public java.util.Set getDurableDestinations()
getDurableDestinations
in interface Broker
public boolean isFaultTolerantConfiguration()
isFaultTolerantConfiguration
in interface Broker
protected void doStop(ServiceStopper ss)
public boolean isKeepDurableSubsActive()
public void setKeepDurableSubsActive(boolean keepDurableSubsActive)
public DestinationInterceptor getDestinationInterceptor()
public ConnectionContext getAdminConnectionContext()
getAdminConnectionContext
in interface Broker
public void setAdminConnectionContext(ConnectionContext adminConnectionContext)
Broker
setAdminConnectionContext
in interface Broker
public java.util.Map getConnectionStates()
public Store getTempDataStore()
getTempDataStore
in interface Broker
public PendingDurableSubscriberMessageStoragePolicy getPendingDurableSubscriberPolicy()
getPendingDurableSubscriberPolicy
in interface Broker
public void setPendingDurableSubscriberPolicy(PendingDurableSubscriberMessageStoragePolicy durableSubscriberCursor)
setPendingDurableSubscriberPolicy
in interface Broker
durableSubscriberCursor
- the pendingDurableSubscriberPolicy to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |