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
|
remove
addBroker, 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, start
public MasterBroker(MutableBrokerFilter parent, Transport transport)
parent
- transport
- public void startProcessing()
public void stop() throws Exception
stop
in interface Service
stop
in class MutableBrokerFilter
Exception
public void stopProcessing()
public void addConnection(ConnectionContext context, ConnectionInfo info) throws Exception
addConnection
in interface Broker
addConnection
in class MutableBrokerFilter
context
- info
- Exception
public void removeConnection(ConnectionContext context, ConnectionInfo info, Throwable error) throws Exception
removeConnection
in interface Broker
removeConnection
in class MutableBrokerFilter
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
public void addSession(ConnectionContext context, SessionInfo info) throws Exception
addSession
in interface Broker
addSession
in class MutableBrokerFilter
context
- info
- Exception
public void removeSession(ConnectionContext context, SessionInfo info) throws Exception
removeSession
in interface Broker
removeSession
in class MutableBrokerFilter
context
- info
- Exception
public void addProducer(ConnectionContext context, ProducerInfo info) throws Exception
addProducer
in interface Broker
addProducer
in interface Region
addProducer
in class MutableBrokerFilter
context
- the enviorment the operation is being executed under.info
- Exception
public void removeProducer(ConnectionContext context, ProducerInfo info) throws Exception
removeProducer
in interface Broker
removeProducer
in interface Region
removeProducer
in class MutableBrokerFilter
context
- the environment the operation is being executed under.info
- Exception
public Subscription addConsumer(ConnectionContext context, ConsumerInfo info) throws Exception
addConsumer
in interface Region
addConsumer
in class MutableBrokerFilter
context
- info
- Exception
public void removeConsumer(ConnectionContext context, ConsumerInfo info) throws Exception
Region
removeConsumer
in interface Region
removeConsumer
in class MutableBrokerFilter
context
- the environment the operation is being executed under.Exception
- TODOpublic void removeSubscription(ConnectionContext context, RemoveSubscriptionInfo info) throws Exception
removeSubscription
in interface Region
removeSubscription
in class MutableBrokerFilter
context
- info
- Exception
public void addDestinationInfo(ConnectionContext context, DestinationInfo info) throws Exception
Broker
addDestinationInfo
in interface Broker
addDestinationInfo
in class MutableBrokerFilter
Exception
public void removeDestinationInfo(ConnectionContext context, DestinationInfo info) throws Exception
Broker
removeDestinationInfo
in interface Broker
removeDestinationInfo
in class MutableBrokerFilter
Exception
public void beginTransaction(ConnectionContext context, TransactionId xid) throws Exception
beginTransaction
in interface Broker
beginTransaction
in class MutableBrokerFilter
context
- xid
- Exception
public int prepareTransaction(ConnectionContext context, TransactionId xid) throws Exception
prepareTransaction
in interface Broker
prepareTransaction
in class MutableBrokerFilter
context
- xid
- Exception
public void rollbackTransaction(ConnectionContext context, TransactionId xid) throws Exception
rollbackTransaction
in interface Broker
rollbackTransaction
in class MutableBrokerFilter
context
- xid
- Exception
public void commitTransaction(ConnectionContext context, TransactionId xid, boolean onePhase) throws Exception
commitTransaction
in interface Broker
commitTransaction
in class MutableBrokerFilter
context
- xid
- onePhase
- Exception
public void forgetTransaction(ConnectionContext context, TransactionId xid) throws Exception
forgetTransaction
in interface Broker
forgetTransaction
in class MutableBrokerFilter
context
- xid
- Exception
public void preProcessDispatch(MessageDispatch messageDispatch)
preProcessDispatch
in interface Broker
preProcessDispatch
in class MutableBrokerFilter
messageDispatch
- public void send(ProducerBrokerExchange producerExchange, Message message) throws Exception
Region
send
in interface Region
send
in class MutableBrokerFilter
context
- message
- Exception
public void acknowledge(ConsumerBrokerExchange consumerExchange, MessageAck ack) throws Exception
Region
acknowledge
in interface Region
acknowledge
in class MutableBrokerFilter
context
- ack
- Exception
public boolean isFaultTolerantConfiguration()
isFaultTolerantConfiguration
in interface Broker
isFaultTolerantConfiguration
in class MutableBrokerFilter
protected void sendToSlave(Message message)
protected void sendToSlave(MessageAck ack)
protected void sendAsyncToSlave(Command command)
protected void sendSyncToSlave(Command command)
Copyright © 2005–2015 The Apache Software Foundation. All rights reserved.