|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.activemq.broker.EmptyBroker
org.apache.activemq.broker.region.RegionBroker
public class RegionBroker
Routes Broker operations to the correct messaging regions for processing.
| Field Summary | |
|---|---|
protected BrokerService |
brokerService
|
protected Map<ConnectionId,ConnectionState> |
connectionStates
|
protected DestinationFactory |
destinationFactory
|
protected DestinationStatistics |
destinationStatistics
|
static String |
ORIGINAL_EXPIRATION
|
| Constructor Summary | |
|---|---|
RegionBroker(BrokerService brokerService,
TaskRunnerFactory taskRunnerFactory,
SystemUsage memoryManager,
DestinationFactory destinationFactory,
DestinationInterceptor destinationInterceptor,
Scheduler scheduler,
ThreadPoolExecutor executor)
|
|
| Method Summary | |
|---|---|
void |
acknowledge(ConsumerBrokerExchange consumerExchange,
MessageAck ack)
Used to acknowledge the receipt of a message by a client. |
void |
addBroker(Connection connection,
BrokerInfo info)
A remote Broker connects |
protected void |
addBrokerInClusterUpdate(BrokerInfo info)
|
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,
boolean createIfTemp)
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 |
beginTransaction(ConnectionContext context,
TransactionId xid)
Starts a transaction. |
void |
brokerServiceStarted()
called when the brokerService starts |
void |
commitTransaction(ConnectionContext context,
TransactionId xid,
boolean onePhase)
Commits a transaction. |
protected Region |
createQueueRegion(SystemUsage memoryManager,
TaskRunnerFactory taskRunnerFactory,
DestinationFactory destinationFactory)
|
protected Region |
createTempQueueRegion(SystemUsage memoryManager,
TaskRunnerFactory taskRunnerFactory,
DestinationFactory destinationFactory)
|
protected Region |
createTempTopicRegion(SystemUsage memoryManager,
TaskRunnerFactory taskRunnerFactory,
DestinationFactory destinationFactory)
|
protected Region |
createTopicRegion(SystemUsage 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(Class type)
Get a Broker from the Broker Stack that is a particular class |
ConnectionContext |
getAdminConnectionContext()
|
BrokerId |
getBrokerId()
Get the id of the broker |
String |
getBrokerName()
Get the name of the broker |
long |
getBrokerSequenceId()
|
BrokerService |
getBrokerService()
|
Connection[] |
getClients()
|
Map<ConnectionId,ConnectionState> |
getConnectionStates()
|
DestinationInterceptor |
getDestinationInterceptor()
|
Map<ActiveMQDestination,Destination> |
getDestinationMap()
Returns a reference to the concurrent hash map that holds known destinations, do not modify |
PolicyMap |
getDestinationPolicy()
|
ActiveMQDestination[] |
getDestinations()
|
Set<Destination> |
getDestinations(ActiveMQDestination destination)
Provide an exact or wildcard lookup of destinations in the region |
DestinationStatistics |
getDestinationStatistics()
|
Set<ActiveMQDestination> |
getDurableDestinations()
|
ThreadPoolExecutor |
getExecutor()
|
BrokerInfo[] |
getPeerBrokerInfos()
Get the BrokerInfo's of any connected Brokers |
TransactionId[] |
getPreparedTransactions(ConnectionContext context)
Gets a list of all the prepared xa transactions. |
Region |
getQueueRegion()
|
protected Region |
getRegion(ActiveMQDestination destination)
|
Broker |
getRoot()
Ensure we get the Broker at the top of the Stack |
Scheduler |
getScheduler()
|
PListStore |
getTempDataStore()
|
Region |
getTempQueueRegion()
|
Region |
getTempTopicRegion()
|
Region |
getTopicRegion()
|
URI |
getVmConnectorURI()
|
boolean |
isAllowTempAutoCreationOnSend()
|
protected boolean |
isEqual(ConnectionId connectionId,
ConnectionId connectionId2)
|
boolean |
isExpired(MessageReference messageReference)
Determine if a message has expired -allows default behaviour to be overriden - as the timestamp set by the producer can be out of sync with the broker |
boolean |
isKeepDurableSubsActive()
|
boolean |
isStopped()
|
void |
messageExpired(ConnectionContext context,
MessageReference node,
Subscription subscription)
A Message has Expired |
Response |
messagePull(ConnectionContext context,
MessagePull pull)
Allows a consumer to pull a message from a queue |
void |
postProcessDispatch(MessageDispatch messageDispatch)
Notify the Broker that a dispatch has happened |
int |
prepareTransaction(ConnectionContext context,
TransactionId xid)
Prepares a transaction. |
void |
preProcessDispatch(MessageDispatch messageDispatch)
Notify the Broker that a dispatch is going to happen |
void |
processConsumerControl(ConsumerBrokerExchange consumerExchange,
ConsumerControl control)
|
void |
processDispatchNotification(MessageDispatchNotification messageDispatchNotification)
Process a notification of a dispatch - used by a Slave Broker |
protected void |
purgeInactiveDestinations()
|
void |
removeBroker(Connection connection,
BrokerInfo info)
Remove a BrokerInfo |
protected void |
removeBrokerInClusterUpdate(BrokerInfo info)
|
void |
removeConnection(ConnectionContext context,
ConnectionInfo info,
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 |
removeSubscription(ConnectionContext context,
RemoveSubscriptionInfo info)
Deletes a durable subscription. |
void |
rollbackTransaction(ConnectionContext context,
TransactionId xid)
Rollsback a transaction. |
void |
send(ProducerBrokerExchange producerExchange,
Message message)
Send a message to the broker to using the specified destination. |
void |
sendToDeadLetterQueue(ConnectionContext context,
MessageReference node,
Subscription subscription)
A message needs to go the a DLQ |
void |
setAdminConnectionContext(ConnectionContext adminConnectionContext)
Sets the default administration connection context used when configuring the broker on startup or via JMX |
void |
setAllowTempAutoCreationOnSend(boolean allowTempAutoCreationOnSend)
|
void |
setBrokerId(BrokerId brokerId)
|
void |
setBrokerName(String brokerName)
|
void |
setKeepDurableSubsActive(boolean keepDurableSubsActive)
|
void |
start()
|
void |
stop()
|
| Methods inherited from class org.apache.activemq.broker.EmptyBroker |
|---|
addSession, fastProducer, isFaultTolerantConfiguration, isFull, messageConsumed, messageDelivered, messageDiscarded, networkBridgeStarted, networkBridgeStopped, nowMasterBroker, removeSession, slowConsumer |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String ORIGINAL_EXPIRATION
protected final DestinationStatistics destinationStatistics
protected DestinationFactory destinationFactory
protected final Map<ConnectionId,ConnectionState> connectionStates
protected final BrokerService brokerService
| Constructor Detail |
|---|
public RegionBroker(BrokerService brokerService,
TaskRunnerFactory taskRunnerFactory,
SystemUsage memoryManager,
DestinationFactory destinationFactory,
DestinationInterceptor destinationInterceptor,
Scheduler scheduler,
ThreadPoolExecutor executor)
throws IOException
IOException| Method Detail |
|---|
public Map<ActiveMQDestination,Destination> getDestinationMap()
Region
getDestinationMap in interface RegiongetDestinationMap in class EmptyBrokerpublic Set<Destination> getDestinations(ActiveMQDestination destination)
Region
getDestinations in interface RegiongetDestinations in class EmptyBrokerpublic Broker getAdaptor(Class type)
Broker
getAdaptor in interface BrokergetAdaptor in class EmptyBrokerpublic Region getQueueRegion()
public Region getTempQueueRegion()
public Region getTempTopicRegion()
public Region getTopicRegion()
protected Region createTempTopicRegion(SystemUsage memoryManager,
TaskRunnerFactory taskRunnerFactory,
DestinationFactory destinationFactory)
protected Region createTempQueueRegion(SystemUsage memoryManager,
TaskRunnerFactory taskRunnerFactory,
DestinationFactory destinationFactory)
protected Region createTopicRegion(SystemUsage memoryManager,
TaskRunnerFactory taskRunnerFactory,
DestinationFactory destinationFactory)
protected Region createQueueRegion(SystemUsage memoryManager,
TaskRunnerFactory taskRunnerFactory,
DestinationFactory destinationFactory)
public void start()
throws Exception
start in interface Servicestart in class EmptyBrokerException
public void stop()
throws Exception
stop in interface Servicestop in class EmptyBrokerExceptionpublic PolicyMap getDestinationPolicy()
public void addConnection(ConnectionContext context,
ConnectionInfo info)
throws Exception
Broker
addConnection in interface BrokeraddConnection in class EmptyBrokerException - TODO
public void removeConnection(ConnectionContext context,
ConnectionInfo info,
Throwable error)
throws Exception
Broker
removeConnection in interface BrokerremoveConnection in class EmptyBrokercontext - 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.
Exception - TODO
protected boolean isEqual(ConnectionId connectionId,
ConnectionId connectionId2)
public Connection[] getClients()
throws Exception
getClients in interface BrokergetClients in class EmptyBrokerException - TODO
public Destination addDestination(ConnectionContext context,
ActiveMQDestination destination,
boolean createIfTemp)
throws Exception
Region
addDestination in interface RegionaddDestination in class EmptyBrokerdestination - the destination to create.
Exception - TODO
public void removeDestination(ConnectionContext context,
ActiveMQDestination destination,
long timeout)
throws Exception
Region
removeDestination in interface RegionremoveDestination in class EmptyBrokercontext - 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
Exception - TODO
public void addDestinationInfo(ConnectionContext context,
DestinationInfo info)
throws Exception
Broker
addDestinationInfo in interface BrokeraddDestinationInfo in class EmptyBrokerException
public void removeDestinationInfo(ConnectionContext context,
DestinationInfo info)
throws Exception
Broker
removeDestinationInfo in interface BrokerremoveDestinationInfo in class EmptyBrokerException
public ActiveMQDestination[] getDestinations()
throws Exception
getDestinations in interface BrokergetDestinations in class EmptyBrokerException - TODO
public void addProducer(ConnectionContext context,
ProducerInfo info)
throws Exception
Broker
addProducer in interface BrokeraddProducer in interface RegionaddProducer in class EmptyBrokercontext - the enviorment the operation is being executed under.
Exception - TODO
public void removeProducer(ConnectionContext context,
ProducerInfo info)
throws Exception
Broker
removeProducer in interface BrokerremoveProducer in interface RegionremoveProducer in class EmptyBrokercontext - the enviorment the operation is being executed under.
Exception - TODO
public Subscription addConsumer(ConnectionContext context,
ConsumerInfo info)
throws Exception
Region
addConsumer in interface RegionaddConsumer in class EmptyBrokercontext - the environment the operation is being executed under.
Exception - TODO
public void removeConsumer(ConnectionContext context,
ConsumerInfo info)
throws Exception
Region
removeConsumer in interface RegionremoveConsumer in class EmptyBrokercontext - the environment the operation is being executed under.
Exception - TODO
public void removeSubscription(ConnectionContext context,
RemoveSubscriptionInfo info)
throws Exception
Region
removeSubscription in interface RegionremoveSubscription in class EmptyBrokercontext - the environment the operation is being executed under.info - TODO
Exception - TODO
public void send(ProducerBrokerExchange producerExchange,
Message message)
throws Exception
Region
send in interface Regionsend in class EmptyBrokerproducerExchange - the environment the operation is being executed under.
Exception - TODO
public void acknowledge(ConsumerBrokerExchange consumerExchange,
MessageAck ack)
throws Exception
Region
acknowledge in interface Regionacknowledge in class EmptyBrokerconsumerExchange - the environment the operation is being executed under.
Exception - TODO
protected Region getRegion(ActiveMQDestination destination)
throws javax.jms.JMSException
javax.jms.JMSException
public Response messagePull(ConnectionContext context,
MessagePull pull)
throws Exception
Region
messagePull in interface RegionmessagePull in class EmptyBrokerException
public TransactionId[] getPreparedTransactions(ConnectionContext context)
throws Exception
Broker
getPreparedTransactions in interface BrokergetPreparedTransactions in class EmptyBrokercontext - transaction ids
Exception - TODO
public void beginTransaction(ConnectionContext context,
TransactionId xid)
throws Exception
Broker
beginTransaction in interface BrokerbeginTransaction in class EmptyBrokerException - TODO
public int prepareTransaction(ConnectionContext context,
TransactionId xid)
throws Exception
Broker
prepareTransaction in interface BrokerprepareTransaction in class EmptyBrokerException - TODO
public void rollbackTransaction(ConnectionContext context,
TransactionId xid)
throws Exception
Broker
rollbackTransaction in interface BrokerrollbackTransaction in class EmptyBrokerException - TODO
public void commitTransaction(ConnectionContext context,
TransactionId xid,
boolean onePhase)
throws Exception
Broker
commitTransaction in interface BrokercommitTransaction in class EmptyBrokerException - TODO
public void forgetTransaction(ConnectionContext context,
TransactionId transactionId)
throws Exception
Broker
forgetTransaction in interface BrokerforgetTransaction in class EmptyBrokerExceptionpublic void gc()
gc in interface Regiongc in class EmptyBrokerpublic BrokerId getBrokerId()
Broker
getBrokerId in interface BrokergetBrokerId in class EmptyBrokerpublic void setBrokerId(BrokerId brokerId)
public String getBrokerName()
Broker
getBrokerName in interface BrokergetBrokerName in class EmptyBrokerpublic void setBrokerName(String brokerName)
public DestinationStatistics getDestinationStatistics()
protected javax.jms.JMSException createUnknownDestinationTypeException(ActiveMQDestination destination)
public void addBroker(Connection connection,
BrokerInfo info)
Broker
addBroker in interface BrokeraddBroker in class EmptyBroker
public void removeBroker(Connection connection,
BrokerInfo info)
Broker
removeBroker in interface BrokerremoveBroker in class EmptyBrokerpublic BrokerInfo[] getPeerBrokerInfos()
Broker
getPeerBrokerInfos in interface BrokergetPeerBrokerInfos in class EmptyBrokerpublic void preProcessDispatch(MessageDispatch messageDispatch)
Broker
preProcessDispatch in interface BrokerpreProcessDispatch in class EmptyBrokerpublic void postProcessDispatch(MessageDispatch messageDispatch)
Broker
postProcessDispatch in interface BrokerpostProcessDispatch in class EmptyBroker
public void processDispatchNotification(MessageDispatchNotification messageDispatchNotification)
throws Exception
Region
processDispatchNotification in interface RegionprocessDispatchNotification in class EmptyBrokerException - TODOpublic boolean isStopped()
isStopped in interface BrokerisStopped in class EmptyBrokerpublic Set<ActiveMQDestination> getDurableDestinations()
getDurableDestinations in interface BrokergetDurableDestinations in class EmptyBrokerprotected void doStop(ServiceStopper ss)
public boolean isKeepDurableSubsActive()
public void setKeepDurableSubsActive(boolean keepDurableSubsActive)
public DestinationInterceptor getDestinationInterceptor()
public ConnectionContext getAdminConnectionContext()
getAdminConnectionContext in interface BrokergetAdminConnectionContext in class EmptyBrokerpublic void setAdminConnectionContext(ConnectionContext adminConnectionContext)
Broker
setAdminConnectionContext in interface BrokersetAdminConnectionContext in class EmptyBrokerpublic Map<ConnectionId,ConnectionState> getConnectionStates()
public PListStore getTempDataStore()
getTempDataStore in interface BrokergetTempDataStore in class EmptyBrokerpublic URI getVmConnectorURI()
getVmConnectorURI in interface BrokergetVmConnectorURI in class EmptyBrokerpublic void brokerServiceStarted()
Broker
brokerServiceStarted in interface BrokerbrokerServiceStarted in class EmptyBrokerpublic BrokerService getBrokerService()
getBrokerService in interface BrokergetBrokerService in class EmptyBrokerpublic boolean isExpired(MessageReference messageReference)
Broker
isExpired in interface BrokerisExpired in class EmptyBroker
public void messageExpired(ConnectionContext context,
MessageReference node,
Subscription subscription)
Broker
messageExpired in interface BrokermessageExpired in class EmptyBroker
public void sendToDeadLetterQueue(ConnectionContext context,
MessageReference node,
Subscription subscription)
Broker
sendToDeadLetterQueue in interface BrokersendToDeadLetterQueue in class EmptyBrokerpublic Broker getRoot()
Broker
getRoot in interface BrokergetRoot in class EmptyBrokerpublic long getBrokerSequenceId()
getBrokerSequenceId in interface BrokergetBrokerSequenceId in class EmptyBrokerpublic Scheduler getScheduler()
getScheduler in interface BrokergetScheduler in class EmptyBrokerpublic ThreadPoolExecutor getExecutor()
getExecutor in interface BrokergetExecutor in class EmptyBroker
public void processConsumerControl(ConsumerBrokerExchange consumerExchange,
ConsumerControl control)
processConsumerControl in interface RegionprocessConsumerControl in class EmptyBrokerprotected void addBrokerInClusterUpdate(BrokerInfo info)
protected void removeBrokerInClusterUpdate(BrokerInfo info)
protected void purgeInactiveDestinations()
public boolean isAllowTempAutoCreationOnSend()
public void setAllowTempAutoCreationOnSend(boolean allowTempAutoCreationOnSend)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||