Home » activemq-parent-5.3.1-source-release » org.apache » activemq » broker » [javadoc | source]
public interface: Broker [javadoc | source]

All Implemented Interfaces:
    Service, Region

The Message Broker which routes messages, maintains subscriptions and connections, acknowledges messages and handles transactions.
Method from org.apache.activemq.broker.Broker Summary:
addBroker,   addConnection,   addDestinationInfo,   addProducer,   addSession,   beginTransaction,   brokerServiceStarted,   commitTransaction,   fastProducer,   forgetTransaction,   getAdaptor,   getAdminConnectionContext,   getBrokerId,   getBrokerName,   getBrokerSequenceId,   getBrokerService,   getClients,   getDestinations,   getDurableDestinations,   getPeerBrokerInfos,   getPreparedTransactions,   getRoot,   getTempDataStore,   getVmConnectorURI,   isExpired,   isFaultTolerantConfiguration,   isFull,   isStopped,   messageConsumed,   messageDelivered,   messageDiscarded,   messageExpired,   nowMasterBroker,   postProcessDispatch,   preProcessDispatch,   prepareTransaction,   removeBroker,   removeConnection,   removeDestinationInfo,   removeProducer,   removeSession,   rollbackTransaction,   sendToDeadLetterQueue,   setAdminConnectionContext,   slowConsumer
Method from org.apache.activemq.broker.Broker Detail:
 public  void addBroker(Connection connection,
    BrokerInfo info)
    A remote Broker connects
 public  void addConnection(ConnectionContext context,
    ConnectionInfo info) throws Exception
    A client is establishing a connection with the broker.
 public  void addDestinationInfo(ConnectionContext context,
    DestinationInfo info) throws Exception
    Add and process a DestinationInfo object
 public  void addProducer(ConnectionContext context,
    ProducerInfo info) throws Exception
    Adds a producer.
 public  void addSession(ConnectionContext context,
    SessionInfo info) throws Exception
    Adds a session.
 public  void beginTransaction(ConnectionContext context,
    TransactionId xid) throws Exception
    Starts a transaction.
 public  void brokerServiceStarted()
    called when the brokerService starts
 public  void commitTransaction(ConnectionContext context,
    TransactionId xid,
    boolean onePhase) throws Exception
    Commits a transaction.
 public  void fastProducer(ConnectionContext context,
    ProducerInfo producerInfo)
    Called to notify a producer is too fast
 public  void forgetTransaction(ConnectionContext context,
    TransactionId transactionId) throws Exception
    Forgets a transaction.
 public Broker getAdaptor(Class type)
    Get a Broker from the Broker Stack that is a particular class
 public ConnectionContext getAdminConnectionContext()
 public BrokerId getBrokerId()
    Get the id of the broker
 public String getBrokerName()
    Get the name of the broker
 public long getBrokerSequenceId()
 public BrokerService getBrokerService()
 public Connection[] getClients() throws Exception
 public ActiveMQDestination[] getDestinations() throws Exception
 public Set<ActiveMQDestination> getDurableDestinations()
 public BrokerInfo[] getPeerBrokerInfos()
    Get the BrokerInfo's of any connected Brokers
 public TransactionId[] getPreparedTransactions(ConnectionContext context) throws Exception
    Gets a list of all the prepared xa transactions.
 public Broker getRoot()
    Ensure we get the Broker at the top of the Stack
 public Store getTempDataStore()
 public URI getVmConnectorURI()
 public 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
 public boolean isFaultTolerantConfiguration()
 public  void isFull(ConnectionContext context,
    Destination destination,
    Usage usage)
    Called when a Usage reaches a limit
 public boolean isStopped()
 public  void messageConsumed(ConnectionContext context,
    MessageReference messageReference)
    called when message is consumed
 public  void messageDelivered(ConnectionContext context,
    MessageReference messageReference)
    Called when message is delivered to the broker
 public  void messageDiscarded(ConnectionContext context,
    MessageReference messageReference)
    Called when a message is discarded - e.g. running low on memory This will happen only if the policy is enabled - e.g. non durable topics
 public  void messageExpired(ConnectionContext context,
    MessageReference messageReference)
    A Message has Expired
 public  void nowMasterBroker()
    called when the broker becomes the master in a master/slave configuration
 public  void postProcessDispatch(MessageDispatch messageDispatch)
    Notify the Broker that a dispatch has happened
 public  void preProcessDispatch(MessageDispatch messageDispatch)
    Notify the Broker that a dispatch is going to happen
 public int prepareTransaction(ConnectionContext context,
    TransactionId xid) throws Exception
    Prepares a transaction. Only valid for xa transactions.
 public  void removeBroker(Connection connection,
    BrokerInfo info)
    Remove a BrokerInfo
 public  void removeConnection(ConnectionContext context,
    ConnectionInfo info,
    Throwable error) throws Exception
    A client is disconnecting from the broker.
 public  void removeDestinationInfo(ConnectionContext context,
    DestinationInfo info) throws Exception
    Remove and process a DestinationInfo object
 public  void removeProducer(ConnectionContext context,
    ProducerInfo info) throws Exception
    Removes a producer.
 public  void removeSession(ConnectionContext context,
    SessionInfo info) throws Exception
    Removes a session.
 public  void rollbackTransaction(ConnectionContext context,
    TransactionId xid) throws Exception
    Rollsback a transaction.
 public  void sendToDeadLetterQueue(ConnectionContext context,
    MessageReference messageReference)
    A message needs to go the a DLQ
 public  void setAdminConnectionContext(ConnectionContext adminConnectionContext)
    Sets the default administration connection context used when configuring the broker on startup or via JMX
 public  void slowConsumer(ConnectionContext context,
    Destination destination,
    Subscription subs)
    Called when there is a slow consumer