|
||||||||||
| 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 Regionpublic java.util.Set getDestinations(ActiveMQDestination destination)
Region
getDestinations in interface Regionpublic Broker getAdaptor(java.lang.Class type)
Broker
getAdaptor in interface Brokerpublic 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 Servicejava.lang.Exception
public void stop()
throws java.lang.Exception
stop in interface Servicejava.lang.Exceptionpublic PolicyMap getDestinationPolicy()
public void addConnection(ConnectionContext context,
ConnectionInfo info)
throws java.lang.Exception
Broker
addConnection in interface Brokerjava.lang.Exception - TODO
public void removeConnection(ConnectionContext context,
ConnectionInfo info,
java.lang.Throwable error)
throws java.lang.Exception
Broker
removeConnection in interface Brokercontext - 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 - TODO
protected boolean isEqual(ConnectionId connectionId,
ConnectionId connectionId2)
public Connection[] getClients()
throws java.lang.Exception
getClients in interface Brokerjava.lang.Exception - TODO
public Destination addDestination(ConnectionContext context,
ActiveMQDestination destination)
throws java.lang.Exception
Region
addDestination in interface Regiondestination - the destination to create.
java.lang.Exception - TODO
public void removeDestination(ConnectionContext context,
ActiveMQDestination destination,
long timeout)
throws java.lang.Exception
Region
removeDestination in interface Regioncontext - 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 - TODO
public void addDestinationInfo(ConnectionContext context,
DestinationInfo info)
throws java.lang.Exception
Broker
addDestinationInfo in interface Brokerjava.lang.Exception
public void removeDestinationInfo(ConnectionContext context,
DestinationInfo info)
throws java.lang.Exception
Broker
removeDestinationInfo in interface Brokerjava.lang.Exception
public ActiveMQDestination[] getDestinations()
throws java.lang.Exception
getDestinations in interface Brokerjava.lang.Exception - TODO
public void addSession(ConnectionContext context,
SessionInfo info)
throws java.lang.Exception
Broker
addSession in interface Brokerjava.lang.Exception - TODO
public void removeSession(ConnectionContext context,
SessionInfo info)
throws java.lang.Exception
Broker
removeSession in interface Brokerjava.lang.Exception - TODO
public void addProducer(ConnectionContext context,
ProducerInfo info)
throws java.lang.Exception
Broker
addProducer in interface Brokercontext - the enviorment the operation is being executed under.
java.lang.Exception - TODO
public void removeProducer(ConnectionContext context,
ProducerInfo info)
throws java.lang.Exception
Broker
removeProducer in interface Brokercontext - the enviorment the operation is being executed under.
java.lang.Exception - TODO
public Subscription addConsumer(ConnectionContext context,
ConsumerInfo info)
throws java.lang.Exception
Region
addConsumer in interface Regioncontext - the environment the operation is being executed under.
java.lang.Exception - TODO
public void removeConsumer(ConnectionContext context,
ConsumerInfo info)
throws java.lang.Exception
Region
removeConsumer in interface Regioncontext - the environment the operation is being executed under.
java.lang.Exception - TODO
public void removeSubscription(ConnectionContext context,
RemoveSubscriptionInfo info)
throws java.lang.Exception
Region
removeSubscription in interface Regioncontext - the environment the operation is being executed under.info - TODO
java.lang.Exception - TODO
public void send(ConnectionContext context,
Message message)
throws java.lang.Exception
Region
send in interface Regioncontext - the environment the operation is being executed under.
java.lang.Exception - TODO
public void acknowledge(ConnectionContext context,
MessageAck ack)
throws java.lang.Exception
Region
acknowledge in interface Regioncontext - the environment the operation is being executed under.
java.lang.Exception - TODO
public Response messagePull(ConnectionContext context,
MessagePull pull)
throws java.lang.Exception
Region
messagePull in interface Regionjava.lang.Exception
public TransactionId[] getPreparedTransactions(ConnectionContext context)
throws java.lang.Exception
Broker
getPreparedTransactions in interface Brokerjava.lang.Exception - TODO
public void beginTransaction(ConnectionContext context,
TransactionId xid)
throws java.lang.Exception
Broker
beginTransaction in interface Brokerjava.lang.Exception - TODO
public int prepareTransaction(ConnectionContext context,
TransactionId xid)
throws java.lang.Exception
Broker
prepareTransaction in interface Brokerjava.lang.Exception - TODO
public void rollbackTransaction(ConnectionContext context,
TransactionId xid)
throws java.lang.Exception
Broker
rollbackTransaction in interface Brokerjava.lang.Exception - TODO
public void commitTransaction(ConnectionContext context,
TransactionId xid,
boolean onePhase)
throws java.lang.Exception
Broker
commitTransaction in interface Brokerjava.lang.Exception - TODO
public void forgetTransaction(ConnectionContext context,
TransactionId transactionId)
throws java.lang.Exception
Broker
forgetTransaction in interface Brokerjava.lang.Exception - TODOpublic void gc()
gc in interface Regionpublic BrokerId getBrokerId()
Broker
getBrokerId in interface Brokerpublic void setBrokerId(BrokerId brokerId)
public java.lang.String getBrokerName()
Broker
getBrokerName in interface Brokerpublic 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 Brokerpublic BrokerInfo[] getPeerBrokerInfos()
Broker
getPeerBrokerInfos in interface Brokerpublic void processDispatch(MessageDispatch messageDispatch)
Broker
processDispatch in interface Broker
public void processDispatchNotification(MessageDispatchNotification messageDispatchNotification)
throws java.lang.Exception
Region
processDispatchNotification in interface Regionjava.lang.Exception - TODOpublic boolean isSlaveBroker()
isSlaveBroker in interface Brokerpublic boolean isStopped()
isStopped in interface Brokerpublic java.util.Set getDurableDestinations()
getDurableDestinations in interface Brokerpublic boolean isFaultTolerantConfiguration()
isFaultTolerantConfiguration in interface Brokerprotected void doStop(ServiceStopper ss)
public boolean isKeepDurableSubsActive()
public void setKeepDurableSubsActive(boolean keepDurableSubsActive)
public DestinationInterceptor getDestinationInterceptor()
public ConnectionContext getAdminConnectionContext()
getAdminConnectionContext in interface Brokerpublic void setAdminConnectionContext(ConnectionContext adminConnectionContext)
Broker
setAdminConnectionContext in interface Brokerpublic java.util.Map getConnectionStates()
public Store getTempDataStore()
getTempDataStore in interface Brokerpublic PendingDurableSubscriberMessageStoragePolicy getPendingDurableSubscriberPolicy()
getPendingDurableSubscriberPolicy in interface Brokerpublic void setPendingDurableSubscriberPolicy(PendingDurableSubscriberMessageStoragePolicy durableSubscriberCursor)
setPendingDurableSubscriberPolicy in interface BrokerdurableSubscriberCursor - the pendingDurableSubscriberPolicy to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||