|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Broker
The Message Broker which routes messages, maintains subscriptions and connections, acknowledges messages and handles transactions.
| Method Summary | |
|---|---|
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. |
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 |
brokerServiceStarted()
called when the brokerService starts |
void |
commitTransaction(ConnectionContext context,
TransactionId xid,
boolean onePhase)
Commits a transaction. |
void |
fastProducer(ConnectionContext context,
ProducerInfo producerInfo,
ActiveMQDestination destination)
Called to notify a producer is too fast |
void |
forgetTransaction(ConnectionContext context,
TransactionId transactionId)
Forgets a transaction. |
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()
|
ActiveMQDestination[] |
getDestinations()
|
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. |
Broker |
getRoot()
Ensure we get the Broker at the top of the Stack |
Scheduler |
getScheduler()
|
PListStore |
getTempDataStore()
|
URI |
getVmConnectorURI()
|
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 |
isFaultTolerantConfiguration()
|
void |
isFull(ConnectionContext context,
Destination destination,
Usage usage)
Called when a Usage reaches a limit |
boolean |
isStopped()
|
void |
messageConsumed(ConnectionContext context,
MessageReference messageReference)
called when message is consumed |
void |
messageDelivered(ConnectionContext context,
MessageReference messageReference)
Called when message is delivered to the broker |
void |
messageDiscarded(ConnectionContext context,
Subscription sub,
MessageReference messageReference)
Called when a message is discarded - e.g. |
void |
messageExpired(ConnectionContext context,
MessageReference messageReference,
Subscription subscription)
A Message has Expired |
void |
networkBridgeStarted(BrokerInfo brokerInfo,
boolean createdByDuplex,
String remoteIp)
|
void |
networkBridgeStopped(BrokerInfo brokerInfo)
|
void |
nowMasterBroker()
called when the broker becomes the master in a master/slave configuration |
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 |
removeBroker(Connection connection,
BrokerInfo info)
Remove a BrokerInfo |
void |
removeConnection(ConnectionContext context,
ConnectionInfo info,
Throwable error)
A client is disconnecting from the broker. |
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 |
rollbackTransaction(ConnectionContext context,
TransactionId xid)
Rollsback a transaction. |
void |
sendToDeadLetterQueue(ConnectionContext context,
MessageReference messageReference,
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 |
slowConsumer(ConnectionContext context,
Destination destination,
Subscription subs)
Called when there is a slow consumer |
| Methods inherited from interface org.apache.activemq.broker.region.Region |
|---|
acknowledge, addConsumer, addDestination, gc, getDestinationMap, getDestinations, messagePull, processConsumerControl, processDispatchNotification, removeConsumer, removeDestination, removeSubscription, send |
| Methods inherited from interface org.apache.activemq.Service |
|---|
start, stop |
| Method Detail |
|---|
Broker getAdaptor(Class type)
type -
BrokerId getBrokerId()
String getBrokerName()
void addBroker(Connection connection,
BrokerInfo info)
void removeBroker(Connection connection,
BrokerInfo info)
connection - info -
void addConnection(ConnectionContext context,
ConnectionInfo info)
throws Exception
Exception - TODO
void removeConnection(ConnectionContext context,
ConnectionInfo info,
Throwable error)
throws Exception
context - the environment the operation is being executed under.info - error - null if the client requested the disconnect or the error
that caused the client to disconnect.
Exception - TODO
void addSession(ConnectionContext context,
SessionInfo info)
throws Exception
context - info -
Exception - TODO
void removeSession(ConnectionContext context,
SessionInfo info)
throws Exception
context - info -
Exception - TODO
void addProducer(ConnectionContext context,
ProducerInfo info)
throws Exception
addProducer in interface Regioncontext - the enviorment the operation is being executed under.
Exception - TODO
void removeProducer(ConnectionContext context,
ProducerInfo info)
throws Exception
removeProducer in interface Regioncontext - the enviorment the operation is being executed under.
Exception - TODO
Connection[] getClients()
throws Exception
Exception - TODO
ActiveMQDestination[] getDestinations()
throws Exception
Exception - TODO
TransactionId[] getPreparedTransactions(ConnectionContext context)
throws Exception
context - transaction ids
Exception - TODO
void beginTransaction(ConnectionContext context,
TransactionId xid)
throws Exception
context - xid -
Exception - TODO
int prepareTransaction(ConnectionContext context,
TransactionId xid)
throws Exception
context - xid -
Exception - TODO
void rollbackTransaction(ConnectionContext context,
TransactionId xid)
throws Exception
context - xid -
Exception - TODO
void commitTransaction(ConnectionContext context,
TransactionId xid,
boolean onePhase)
throws Exception
context - xid - onePhase -
Exception - TODO
void forgetTransaction(ConnectionContext context,
TransactionId transactionId)
throws Exception
context - transactionId -
ExceptionBrokerInfo[] getPeerBrokerInfos()
void preProcessDispatch(MessageDispatch messageDispatch)
messageDispatch - void postProcessDispatch(MessageDispatch messageDispatch)
messageDispatch - boolean isStopped()
Set<ActiveMQDestination> getDurableDestinations()
void addDestinationInfo(ConnectionContext context,
DestinationInfo info)
throws Exception
context - info -
Exception
void removeDestinationInfo(ConnectionContext context,
DestinationInfo info)
throws Exception
context - info -
Exceptionboolean isFaultTolerantConfiguration()
ConnectionContext getAdminConnectionContext()
void setAdminConnectionContext(ConnectionContext adminConnectionContext)
adminConnectionContext - PListStore getTempDataStore()
URI getVmConnectorURI()
void brokerServiceStarted()
BrokerService getBrokerService()
Broker getRoot()
boolean isExpired(MessageReference messageReference)
messageReference -
void messageExpired(ConnectionContext context,
MessageReference messageReference,
Subscription subscription)
context - messageReference - subscription, - may be null
void sendToDeadLetterQueue(ConnectionContext context,
MessageReference messageReference,
Subscription subscription)
context - messageReference - subscription, - may be nulllong getBrokerSequenceId()
void messageConsumed(ConnectionContext context,
MessageReference messageReference)
context - messageReference -
void messageDelivered(ConnectionContext context,
MessageReference messageReference)
context - messageReference -
void messageDiscarded(ConnectionContext context,
Subscription sub,
MessageReference messageReference)
context - sub - messageReference -
void slowConsumer(ConnectionContext context,
Destination destination,
Subscription subs)
context - destination - subs -
void fastProducer(ConnectionContext context,
ProducerInfo producerInfo,
ActiveMQDestination destination)
context - producerInfo - destination -
void isFull(ConnectionContext context,
Destination destination,
Usage usage)
context - destination - usage - void nowMasterBroker()
Scheduler getScheduler()
ThreadPoolExecutor getExecutor()
void networkBridgeStarted(BrokerInfo brokerInfo,
boolean createdByDuplex,
String remoteIp)
void networkBridgeStopped(BrokerInfo brokerInfo)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||