public class CamelRoutesBroker extends BrokerFilter
next
Constructor and Description |
---|
CamelRoutesBroker(Broker next) |
Modifier and Type | Method and Description |
---|---|
void |
acknowledge(ConsumerBrokerExchange consumerExchange,
MessageAck ack)
Used to acknowledge the receipt of a message by a client.
|
void |
beginTransaction(ConnectionContext context,
TransactionId xid)
Starts a transaction.
|
void |
commitTransaction(ConnectionContext context,
TransactionId xid,
boolean onePhase)
Commits a transaction.
|
void |
forgetTransaction(ConnectionContext context,
TransactionId transactionId)
Forgets a transaction.
|
int |
getCheckPeriod() |
String |
getRoutesFile() |
void |
isFull(ConnectionContext context,
Destination destination,
Usage usage)
Called when a Usage reaches a limit
|
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.
|
Response |
messagePull(ConnectionContext context,
MessagePull pull)
Allows a consumer to pull a message from a queue
|
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 |
processConsumerControl(ConsumerBrokerExchange consumerExchange,
ConsumerControl control) |
void |
reapplyInterceptor() |
void |
rollbackTransaction(ConnectionContext context,
TransactionId xid)
Rollsback a transaction.
|
void |
send(ProducerBrokerExchange producerExchange,
Message message)
Overide methods to pause the broker whilst camel routes are loaded
|
boolean |
sendToDeadLetterQueue(ConnectionContext context,
MessageReference messageReference,
Subscription subscription,
Throwable poisonCause)
A message needs to go the a DLQ
|
void |
setCheckPeriod(int checkPeriod) |
void |
setRoutesFile(String routesFile) |
void |
start() |
void |
stop() |
addBroker, addConnection, addConsumer, addDestination, addDestinationInfo, addProducer, addSession, brokerServiceStarted, fastProducer, gc, getAdaptor, getAdminConnectionContext, getBrokerId, getBrokerName, getBrokerSequenceId, getBrokerService, getClients, getDestinationMap, getDestinationMap, getDestinations, getDestinations, getDurableDestinations, getExecutor, getPeerBrokerInfos, getPreparedTransactions, getRoot, getScheduler, getTempDataStore, getVmConnectorURI, isExpired, isFaultTolerantConfiguration, isStopped, messageExpired, networkBridgeStarted, networkBridgeStopped, processDispatchNotification, removeBroker, removeConnection, removeConsumer, removeDestination, removeDestinationInfo, removeProducer, removeSession, removeSubscription, setAdminConnectionContext, slowConsumer
public CamelRoutesBroker(Broker next)
public void send(ProducerBrokerExchange producerExchange, Message message) throws Exception
send
in interface Region
send
in class BrokerFilter
producerExchange
- the environment the operation is being executed under.Exception
- TODOpublic void acknowledge(ConsumerBrokerExchange consumerExchange, MessageAck ack) throws Exception
Region
acknowledge
in interface Region
acknowledge
in class BrokerFilter
consumerExchange
- the environment the operation is being executed under.Exception
- TODOpublic Response messagePull(ConnectionContext context, MessagePull pull) throws Exception
Region
messagePull
in interface Region
messagePull
in class BrokerFilter
Exception
public void processConsumerControl(ConsumerBrokerExchange consumerExchange, ConsumerControl control)
processConsumerControl
in interface Region
processConsumerControl
in class BrokerFilter
public void reapplyInterceptor()
reapplyInterceptor
in interface Region
reapplyInterceptor
in class BrokerFilter
public void beginTransaction(ConnectionContext context, TransactionId xid) throws Exception
Broker
beginTransaction
in interface Broker
beginTransaction
in class BrokerFilter
Exception
- TODOpublic int prepareTransaction(ConnectionContext context, TransactionId xid) throws Exception
Broker
prepareTransaction
in interface Broker
prepareTransaction
in class BrokerFilter
Exception
- TODOpublic void rollbackTransaction(ConnectionContext context, TransactionId xid) throws Exception
Broker
rollbackTransaction
in interface Broker
rollbackTransaction
in class BrokerFilter
Exception
- TODOpublic void commitTransaction(ConnectionContext context, TransactionId xid, boolean onePhase) throws Exception
Broker
commitTransaction
in interface Broker
commitTransaction
in class BrokerFilter
Exception
- TODOpublic void forgetTransaction(ConnectionContext context, TransactionId transactionId) throws Exception
Broker
forgetTransaction
in interface Broker
forgetTransaction
in class BrokerFilter
Exception
public void preProcessDispatch(MessageDispatch messageDispatch)
Broker
preProcessDispatch
in interface Broker
preProcessDispatch
in class BrokerFilter
public void postProcessDispatch(MessageDispatch messageDispatch)
Broker
postProcessDispatch
in interface Broker
postProcessDispatch
in class BrokerFilter
public boolean sendToDeadLetterQueue(ConnectionContext context, MessageReference messageReference, Subscription subscription, Throwable poisonCause)
Broker
sendToDeadLetterQueue
in interface Broker
sendToDeadLetterQueue
in class BrokerFilter
poisonCause
- reason for dlq submission, may be nullpublic void messageConsumed(ConnectionContext context, MessageReference messageReference)
Broker
messageConsumed
in interface Broker
messageConsumed
in class BrokerFilter
public void messageDelivered(ConnectionContext context, MessageReference messageReference)
Broker
messageDelivered
in interface Broker
messageDelivered
in class BrokerFilter
public void messageDiscarded(ConnectionContext context, Subscription sub, MessageReference messageReference)
Broker
messageDiscarded
in interface Broker
messageDiscarded
in class BrokerFilter
public void isFull(ConnectionContext context, Destination destination, Usage usage)
Broker
isFull
in interface Broker
isFull
in class BrokerFilter
public void nowMasterBroker()
Broker
nowMasterBroker
in interface Broker
nowMasterBroker
in class BrokerFilter
public String getRoutesFile()
public void setRoutesFile(String routesFile)
public int getCheckPeriod()
public void setCheckPeriod(int checkPeriod)
public void start() throws Exception
start
in interface Service
start
in class BrokerFilter
Exception
Copyright © 2005–2016 FuseSource, Corp.. All rights reserved.