Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.activemq.broker
Interface Broker  view Broker download Broker.java

All Superinterfaces:
org.activemq.capacity.CapacityMonitor, org.activemq.service.Service

public interface Broker
extends org.activemq.service.Service, org.activemq.capacity.CapacityMonitor

The Message Broker which routes messages, maintains subscriptions and connections, acknowlegdges messages and handles transactions.

Version:
$Revision: 1.1.1.1 $

Nested Class Summary
 
Nested classes inherited from class org.activemq.capacity.CapacityMonitor
org.activemq.capacity.CapacityMonitor.BasicCapacityMonitor
 
Method Summary
 void acknowledgeMessage(BrokerClient client, org.activemq.message.MessageAck ack)
          Acknowledge positively or negatively, the consumption of a message by the Message Consumer
 void addClient(BrokerClient client, org.activemq.message.ConnectionInfo info)
          Notification of a new client attempting to connect, which can be rejected if authentication or authorization fails.
 void addConsumerInfoListener(ConsumerInfoListener l)
          Add a ConsumerInfoListener to the Broker
 void addMessageConsumer(BrokerClient client, org.activemq.message.ConsumerInfo info)
          Add an active message consumer, which could be rejected due to authorization
 void addMessageProducer(BrokerClient client, org.activemq.message.ProducerInfo info)
          Adds a new message producer, which could be rejected due to authorization
 void commitTransaction(BrokerClient client, org.activemq.message.ActiveMQXid xid, boolean onePhase)
           
 void commitTransaction(BrokerClient client, java.lang.String transactionId)
          commit a transaction
 void deleteSubscription(java.lang.String clientId, java.lang.String subscriberName)
          Delete a durable subscriber
 BrokerAdmin getBrokerAdmin()
          Get's the admin interface of the broker.
 java.lang.String getBrokerClusterName()
           
 org.activemq.message.BrokerInfo getBrokerInfo()
           
 java.lang.String getBrokerName()
           
 java.util.Map getContainerManagerMap()
           
 org.activemq.service.DeadLetterPolicy getDeadLetterPolicy()
           
 javax.naming.Context getDestinationContext(java.util.Hashtable environment)
          Returns the naming context of the destinations available in this broker
 org.activemq.store.PersistenceAdapter getPersistenceAdapter()
           
 org.activemq.service.MessageContainerManager getPersistentQueueContainerManager()
           
 org.activemq.service.MessageContainerManager getPersistentTopicContainerManager()
           
 org.activemq.message.ActiveMQXid[] getPreparedTransactions(BrokerClient client)
          gets a list of all the prepared xa transactions.
 org.activemq.service.RedeliveryPolicy getRedeliveryPolicy()
           
 org.activemq.security.SecurityAdapter getSecurityAdapter()
          Returns the security adapter used to authenticate and authorize access to JMS resources
 java.io.File getTempDir()
          Get a temp directory - used for spooling
 org.activemq.service.MessageContainerManager getTransientQueueContainerManager()
           
 org.activemq.service.MessageContainerManager getTransientTopicContainerManager()
           
 int prepareTransaction(BrokerClient client, org.activemq.message.ActiveMQXid xid)
           
 void removeClient(BrokerClient client, org.activemq.message.ConnectionInfo info)
          A hint to the broker that an BrokerClient has stopped This enables the broker to clean-up any outstanding processing that may be outstanding
 void removeConsumerInfoListener(ConsumerInfoListener l)
          Remove a ConsumerInfoListener from the Broker
 void removeMessageConsumer(BrokerClient client, org.activemq.message.ConsumerInfo info)
          remove an active message consumer
 void removeMessageProducer(BrokerClient client, org.activemq.message.ProducerInfo info)
          Removes a producer
 void rollbackTransaction(BrokerClient client, org.activemq.message.ActiveMQXid xid)
           
 void rollbackTransaction(BrokerClient client, java.lang.String transactionId)
          rollback a transaction
 void sendMessage(BrokerClient client, org.activemq.message.ActiveMQMessage message)
          send a message to the broker
 void sendToDeadLetterQueue(java.lang.String deadLetterName, org.activemq.message.ActiveMQMessage message)
          Add a message to a dead letter queue
 void setDeadLetterPolicy(org.activemq.service.DeadLetterPolicy deadLetterPolicy)
          set the dead letter policy
 void setPersistenceAdapter(org.activemq.store.PersistenceAdapter persistenceAdapter)
          set the persistence adaptor
 void setRedeliveryPolicy(org.activemq.service.RedeliveryPolicy redeliveryPolicy)
          set the redelivery policy
 void setSecurityAdapter(org.activemq.security.SecurityAdapter securityAdapter)
          Sets the security adapter used to authenticate and authorize access to JMS resources
 void startTransaction(BrokerClient client, org.activemq.message.ActiveMQXid xid)
           
 void startTransaction(BrokerClient client, java.lang.String transactionId)
          start a transaction
 
Methods inherited from interface org.activemq.service.Service
start, stop
 
Methods inherited from interface org.activemq.capacity.CapacityMonitor
addCapacityEventListener, generateCapacityMonitorEvent, getCurrentCapacity, getCurrentValue, getName, getRoundedCapacity, getRoundingFactor, getValueLimit, removeCapacityEventListener, setCurrentValue, setName, setRoundingFactor, setValueLimit
 

Method Detail

getBrokerAdmin

public BrokerAdmin getBrokerAdmin()
Get's the admin interface of the broker.


getBrokerInfo

public org.activemq.message.BrokerInfo getBrokerInfo()

addClient

public void addClient(BrokerClient client,
                      org.activemq.message.ConnectionInfo info)
               throws javax.jms.JMSException
Notification of a new client attempting to connect, which can be rejected if authentication or authorization fails.


removeClient

public void removeClient(BrokerClient client,
                         org.activemq.message.ConnectionInfo info)
                  throws javax.jms.JMSException
A hint to the broker that an BrokerClient has stopped This enables the broker to clean-up any outstanding processing that may be outstanding


addMessageProducer

public void addMessageProducer(BrokerClient client,
                               org.activemq.message.ProducerInfo info)
                        throws javax.jms.JMSException
Adds a new message producer, which could be rejected due to authorization


removeMessageProducer

public void removeMessageProducer(BrokerClient client,
                                  org.activemq.message.ProducerInfo info)
                           throws javax.jms.JMSException
Removes a producer


addMessageConsumer

public void addMessageConsumer(BrokerClient client,
                               org.activemq.message.ConsumerInfo info)
                        throws javax.jms.JMSException
Add an active message consumer, which could be rejected due to authorization


removeMessageConsumer

public void removeMessageConsumer(BrokerClient client,
                                  org.activemq.message.ConsumerInfo info)
                           throws javax.jms.JMSException
remove an active message consumer


sendMessage

public void sendMessage(BrokerClient client,
                        org.activemq.message.ActiveMQMessage message)
                 throws javax.jms.JMSException
send a message to the broker


acknowledgeMessage

public void acknowledgeMessage(BrokerClient client,
                               org.activemq.message.MessageAck ack)
                        throws javax.jms.JMSException
Acknowledge positively or negatively, the consumption of a message by the Message Consumer


getPreparedTransactions

public org.activemq.message.ActiveMQXid[] getPreparedTransactions(BrokerClient client)
                                                           throws javax.transaction.xa.XAException
gets a list of all the prepared xa transactions.


deleteSubscription

public void deleteSubscription(java.lang.String clientId,
                               java.lang.String subscriberName)
                        throws javax.jms.JMSException
Delete a durable subscriber


startTransaction

public void startTransaction(BrokerClient client,
                             java.lang.String transactionId)
                      throws javax.jms.JMSException
start a transaction


commitTransaction

public void commitTransaction(BrokerClient client,
                              java.lang.String transactionId)
                       throws javax.jms.JMSException
commit a transaction


rollbackTransaction

public void rollbackTransaction(BrokerClient client,
                                java.lang.String transactionId)
                         throws javax.jms.JMSException
rollback a transaction


startTransaction

public void startTransaction(BrokerClient client,
                             org.activemq.message.ActiveMQXid xid)
                      throws javax.transaction.xa.XAException

prepareTransaction

public int prepareTransaction(BrokerClient client,
                              org.activemq.message.ActiveMQXid xid)
                       throws javax.transaction.xa.XAException

rollbackTransaction

public void rollbackTransaction(BrokerClient client,
                                org.activemq.message.ActiveMQXid xid)
                         throws javax.transaction.xa.XAException

commitTransaction

public void commitTransaction(BrokerClient client,
                              org.activemq.message.ActiveMQXid xid,
                              boolean onePhase)
                       throws javax.transaction.xa.XAException

getTempDir

public java.io.File getTempDir()
Get a temp directory - used for spooling


getBrokerName

public java.lang.String getBrokerName()

getBrokerClusterName

public java.lang.String getBrokerClusterName()

getPersistenceAdapter

public org.activemq.store.PersistenceAdapter getPersistenceAdapter()

setPersistenceAdapter

public void setPersistenceAdapter(org.activemq.store.PersistenceAdapter persistenceAdapter)
set the persistence adaptor


getContainerManagerMap

public java.util.Map getContainerManagerMap()

getDestinationContext

public javax.naming.Context getDestinationContext(java.util.Hashtable environment)
Returns the naming context of the destinations available in this broker


addConsumerInfoListener

public void addConsumerInfoListener(ConsumerInfoListener l)
Add a ConsumerInfoListener to the Broker


removeConsumerInfoListener

public void removeConsumerInfoListener(ConsumerInfoListener l)
Remove a ConsumerInfoListener from the Broker


getPersistentTopicContainerManager

public org.activemq.service.MessageContainerManager getPersistentTopicContainerManager()

getTransientTopicContainerManager

public org.activemq.service.MessageContainerManager getTransientTopicContainerManager()

getPersistentQueueContainerManager

public org.activemq.service.MessageContainerManager getPersistentQueueContainerManager()

getTransientQueueContainerManager

public org.activemq.service.MessageContainerManager getTransientQueueContainerManager()

getSecurityAdapter

public org.activemq.security.SecurityAdapter getSecurityAdapter()
Returns the security adapter used to authenticate and authorize access to JMS resources


setSecurityAdapter

public void setSecurityAdapter(org.activemq.security.SecurityAdapter securityAdapter)
Sets the security adapter used to authenticate and authorize access to JMS resources


getRedeliveryPolicy

public org.activemq.service.RedeliveryPolicy getRedeliveryPolicy()

setRedeliveryPolicy

public void setRedeliveryPolicy(org.activemq.service.RedeliveryPolicy redeliveryPolicy)
set the redelivery policy


getDeadLetterPolicy

public org.activemq.service.DeadLetterPolicy getDeadLetterPolicy()

setDeadLetterPolicy

public void setDeadLetterPolicy(org.activemq.service.DeadLetterPolicy deadLetterPolicy)
set the dead letter policy


sendToDeadLetterQueue

public void sendToDeadLetterQueue(java.lang.String deadLetterName,
                                  org.activemq.message.ActiveMQMessage message)
                           throws javax.jms.JMSException
Add a message to a dead letter queue