public class MasterBroker extends InsertableMutableBrokerFilter
next| Constructor and Description |
|---|
MasterBroker(MutableBrokerFilter parent,
Transport transport)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
acknowledge(ConsumerBrokerExchange consumerExchange,
MessageAck ack)
Used to acknowledge the receipt of a message by a client.
|
void |
addConnection(ConnectionContext context,
ConnectionInfo info)
A client is establishing a connection with the broker.
|
Subscription |
addConsumer(ConnectionContext context,
ConsumerInfo info)
add a consumer
|
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)
begin a transaction
|
void |
commitTransaction(ConnectionContext context,
TransactionId xid,
boolean onePhase)
Commits a transaction.
|
void |
forgetTransaction(ConnectionContext context,
TransactionId xid)
Forgets a transaction.
|
boolean |
isFaultTolerantConfiguration() |
int |
prepareTransaction(ConnectionContext context,
TransactionId xid)
Prepares a transaction.
|
void |
preProcessDispatch(MessageDispatch messageDispatch)
Notifiy the Broker that a dispatch will happen
Do in 'pre' so that slave will avoid getting ack before dispatch
similar logic to send() below.
|
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 |
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)
remove a 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.
|
protected void |
sendAsyncToSlave(Command command) |
protected void |
sendSyncToSlave(Command command) |
protected void |
sendToSlave(Message message) |
protected void |
sendToSlave(MessageAck ack) |
void |
startProcessing()
start processing this broker
|
void |
stop()
stop the broker
|
void |
stopProcessing()
stop processing this broker
|
removeaddBroker, addDestination, brokerServiceStarted, fastProducer, gc, getAdaptor, getAdminConnectionContext, getBrokerId, getBrokerName, getBrokerSequenceId, getBrokerService, getClients, getDestinationMap, getDestinations, getDestinations, getDurableDestinations, getExecutor, getNext, getPeerBrokerInfos, getPreparedTransactions, getRoot, getScheduler, getTempDataStore, getVmConnectorURI, isExpired, isFull, isStopped, messageConsumed, messageDelivered, messageDiscarded, messageExpired, messagePull, networkBridgeStarted, networkBridgeStopped, nowMasterBroker, postProcessDispatch, processConsumerControl, processDispatchNotification, removeBroker, removeDestination, sendToDeadLetterQueue, setAdminConnectionContext, setNext, slowConsumer, startpublic MasterBroker(MutableBrokerFilter parent, Transport transport)
parent - transport - public void startProcessing()
public void stop() throws Exception
stop in interface Servicestop in class MutableBrokerFilterExceptionpublic void stopProcessing()
public void addConnection(ConnectionContext context, ConnectionInfo info) throws Exception
addConnection in interface BrokeraddConnection in class MutableBrokerFiltercontext - info - Exceptionpublic void removeConnection(ConnectionContext context, ConnectionInfo info, Throwable error) throws Exception
removeConnection in interface BrokerremoveConnection in class MutableBrokerFiltercontext - 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.Exceptionpublic void addSession(ConnectionContext context, SessionInfo info) throws Exception
addSession in interface BrokeraddSession in class MutableBrokerFiltercontext - info - Exceptionpublic void removeSession(ConnectionContext context, SessionInfo info) throws Exception
removeSession in interface BrokerremoveSession in class MutableBrokerFiltercontext - info - Exceptionpublic void addProducer(ConnectionContext context, ProducerInfo info) throws Exception
addProducer in interface BrokeraddProducer in interface RegionaddProducer in class MutableBrokerFiltercontext - the enviorment the operation is being executed under.info - Exceptionpublic void removeProducer(ConnectionContext context, ProducerInfo info) throws Exception
removeProducer in interface BrokerremoveProducer in interface RegionremoveProducer in class MutableBrokerFiltercontext - the environment the operation is being executed under.info - Exceptionpublic Subscription addConsumer(ConnectionContext context, ConsumerInfo info) throws Exception
addConsumer in interface RegionaddConsumer in class MutableBrokerFiltercontext - info - Exceptionpublic void removeConsumer(ConnectionContext context, ConsumerInfo info) throws Exception
RegionremoveConsumer in interface RegionremoveConsumer in class MutableBrokerFiltercontext - the environment the operation is being executed under.Exception - TODOpublic void removeSubscription(ConnectionContext context, RemoveSubscriptionInfo info) throws Exception
removeSubscription in interface RegionremoveSubscription in class MutableBrokerFiltercontext - info - Exceptionpublic void addDestinationInfo(ConnectionContext context, DestinationInfo info) throws Exception
BrokeraddDestinationInfo in interface BrokeraddDestinationInfo in class MutableBrokerFilterExceptionpublic void removeDestinationInfo(ConnectionContext context, DestinationInfo info) throws Exception
BrokerremoveDestinationInfo in interface BrokerremoveDestinationInfo in class MutableBrokerFilterExceptionpublic void beginTransaction(ConnectionContext context, TransactionId xid) throws Exception
beginTransaction in interface BrokerbeginTransaction in class MutableBrokerFiltercontext - xid - Exceptionpublic int prepareTransaction(ConnectionContext context, TransactionId xid) throws Exception
prepareTransaction in interface BrokerprepareTransaction in class MutableBrokerFiltercontext - xid - Exceptionpublic void rollbackTransaction(ConnectionContext context, TransactionId xid) throws Exception
rollbackTransaction in interface BrokerrollbackTransaction in class MutableBrokerFiltercontext - xid - Exceptionpublic void commitTransaction(ConnectionContext context, TransactionId xid, boolean onePhase) throws Exception
commitTransaction in interface BrokercommitTransaction in class MutableBrokerFiltercontext - xid - onePhase - Exceptionpublic void forgetTransaction(ConnectionContext context, TransactionId xid) throws Exception
forgetTransaction in interface BrokerforgetTransaction in class MutableBrokerFiltercontext - xid - Exceptionpublic void preProcessDispatch(MessageDispatch messageDispatch)
preProcessDispatch in interface BrokerpreProcessDispatch in class MutableBrokerFiltermessageDispatch - public void send(ProducerBrokerExchange producerExchange, Message message) throws Exception
Regionsend in interface Regionsend in class MutableBrokerFiltercontext - message - Exceptionpublic void acknowledge(ConsumerBrokerExchange consumerExchange, MessageAck ack) throws Exception
Regionacknowledge in interface Regionacknowledge in class MutableBrokerFiltercontext - ack - Exceptionpublic boolean isFaultTolerantConfiguration()
isFaultTolerantConfiguration in interface BrokerisFaultTolerantConfiguration in class MutableBrokerFilterprotected void sendToSlave(Message message)
protected void sendToSlave(MessageAck ack)
protected void sendAsyncToSlave(Command command)
protected void sendSyncToSlave(Command command)
Copyright © 2005–2017. All rights reserved.