Broker (ActiveMQ 1.1 API)
Keywords: org.codehaus.activemq.broker.Broker interface

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.activemq.broker
Interface Broker

All Superinterfaces:
  CapacityMonitor, Service

All Known Implementing Classes:
  DefaultBroker

public interface Broker
extends Service, CapacityMonitor

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

Version:
  $Revision: 1.15 $

Nested Class Summary

Nested classes inherited from class org.codehaus.activemq.capacity.CapacityMonitor
`CapacityMonitor.BasicCapacityMonitor`

Method Summary
`void` | `acknowledgeMessage(BrokerClient client, MessageAck ack)` Acknowledge positively or negatively, the consumption of a message by the Message Consumer
`void` | `acknowledgeTransactedMessage(BrokerClient client, String transactionId, MessageAck ack)` Acknowledge positively or negatively, the consumption of a message within a transaction
`void` | `addClient(BrokerClient client, 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, ConsumerInfo info)` Add an active message consumer, which could be rejected due to authorization
`void` | `addMessageProducer(BrokerClient client, ProducerInfo info)` Adds a new message producer, which could be rejected due to authorization
`void` | `commitTransaction(BrokerClient client, ActiveMQXid xid, boolean onePhase)`
`void` | `commitTransaction(BrokerClient client, String transactionId)` commit a transaction
`void` | `deleteSubscription(String clientId, String subscriberName)` Delete a durable subscriber
`String` | `getBrokerClusterName()`
`String` | `getBrokerName()`
`Map` | `getContainerManagerMap()`
`Context` | `getDestinationContext(Hashtable environment)` Returns the naming context of the destinations available in this broker
`PersistenceAdapter` | `getPersistenceAdapter()`
`MessageContainerManager` | `getPersistentQueueContainerManager()`
`MessageContainerManager` | `getPersistentTopicContainerManager()`
`ActiveMQXid[]` | `getPreparedTransactions(BrokerClient client)` gets a list of all the prepared xa transactions.
`RedeliveryPolicy` | `getRedeliveryPolicy()`
`SecurityAdapter` | `getSecurityAdapter()` Returns the security adapter used to authenticate and authorize access to JMS resources
`File` | `getTempDir()` Get a temp directory - used for spooling
`MessageContainerManager` | `getTransientQueueContainerManager()`
`MessageContainerManager` | `getTransientTopicContainerManager()`
`int` | `prepareTransaction(BrokerClient client, ActiveMQXid xid)`
`void` | `redeliverMessage(BrokerClient client, MessageAck ack)` Called after a rollback of a JMS transaction to redeliver the message to the consumers dispatch queue
`void` | `removeClient(BrokerClient client, 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, ConsumerInfo info)` remove an active message consumer
`void` | `removeMessageProducer(BrokerClient client, ProducerInfo info)` Removes a producer
`void` | `rollbackTransaction(BrokerClient client, ActiveMQXid xid)`
`void` | `rollbackTransaction(BrokerClient client, String transactionId)` rollback a transaction
`void` | `sendMessage(BrokerClient client, ActiveMQMessage message)` send a message to the broker
`void` | `sendTransactedMessage(BrokerClient client, String transactionId, ActiveMQMessage message)` send a message to the broker within a transaction
`void` | `setPersistenceAdapter(PersistenceAdapter persistenceAdapter)` set the persistence adaptor
`void` | `setRedeliveryPolicy(RedeliveryPolicy redeliveryPolicy)`
`void` | `setSecurityAdapter(SecurityAdapter securityAdapter)` Sets the security adapter used to authenticate and authorize access to JMS resources
`void` | `startTransaction(BrokerClient client, ActiveMQXid xid)`
`void` | `startTransaction(BrokerClient client, String transactionId)` start a transaction

Methods inherited from interface org.codehaus.activemq.service.Service
`start, stop`

Methods inherited from interface org.codehaus.activemq.capacity.CapacityMonitor
`addCapacityEventListener, getCurrentCapacity, getCurrentValue, getName, getRoundedCapacity, getRoundingFactor, getValueLimit, removeCapacityEventListener, setCurrentValue, setName, setRoundingFactor, setValueLimit`

Method Detail

### addClient

    public void addClient(BrokerClient client,
                          ConnectionInfo info)
                   throws JMSException

  Notification of a new client attempting to connect, which can be rejected if authentication or authorization fails.

  Throws:
    `JMSException`

### removeClient

    public void removeClient(BrokerClient client,
                             ConnectionInfo info)
                      throws 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

  Throws:
    `JMSException`

### addMessageProducer

    public void addMessageProducer(BrokerClient client,
                                   ProducerInfo info)
                            throws JMSException

  Adds a new message producer, which could be rejected due to authorization

  Throws:
    `JMSException`

### removeMessageProducer

    public void removeMessageProducer(BrokerClient client,
                                      ProducerInfo info)
                               throws JMSException

  Removes a producer

  Throws:
    `JMSException`

### addMessageConsumer

    public void addMessageConsumer(BrokerClient client,
                                   ConsumerInfo info)
                            throws JMSException

  Add an active message consumer, which could be rejected due to authorization

  Throws:
    `JMSException`

### removeMessageConsumer

    public void removeMessageConsumer(BrokerClient client,
                                      ConsumerInfo info)
                               throws JMSException

  remove an active message consumer

  Throws:
    `JMSException`

### sendMessage

    public void sendMessage(BrokerClient client,
                            ActiveMQMessage message)
                     throws JMSException

  send a message to the broker

  Throws:
    `JMSException`

### sendTransactedMessage

    public void sendTransactedMessage(BrokerClient client,
                                      String transactionId,
                                      ActiveMQMessage message)
                               throws JMSException

  send a message to the broker within a transaction

  Throws:
    `JMSException`

### acknowledgeMessage

    public void acknowledgeMessage(BrokerClient client,
                                   MessageAck ack)
                            throws JMSException

  Acknowledge positively or negatively, the consumption of a message by the Message Consumer

  Throws:
    `JMSException`

### acknowledgeTransactedMessage

    public void acknowledgeTransactedMessage(BrokerClient client,
                                             String transactionId,
                                             MessageAck ack)
                                      throws JMSException

  Acknowledge positively or negatively, the consumption of a message within a transaction

  Throws:
    `JMSException`

### getPreparedTransactions

    public ActiveMQXid[] getPreparedTransactions(BrokerClient client)
                                          throws XAException

  gets a list of all the prepared xa transactions.

  Parameters:
    `client` -
  Throws:
    `XAException`

### redeliverMessage

    public void redeliverMessage(BrokerClient client,
                                 MessageAck ack)
                          throws JMSException

  Called after a rollback of a JMS transaction to redeliver the message to the consumers dispatch queue

  Parameters:
    `client` -
    `ack` -
  Throws:
    `JMSException`

### deleteSubscription

    public void deleteSubscription(String clientId,
                                   String subscriberName)
                            throws JMSException

  Delete a durable subscriber

  Parameters:
    `clientId` -
    `subscriberName` -
  Throws:
    `JMSException` - if the subscriber doesn't exist or is still active

### startTransaction

    public void startTransaction(BrokerClient client,
                                 String transactionId)
                          throws JMSException

  start a transaction

  Parameters:
    `client` -
    `transactionId` -
  Throws:
    `JMSException`

### commitTransaction

    public void commitTransaction(BrokerClient client,
                                  String transactionId)
                           throws JMSException

  commit a transaction

  Parameters:
    `client` -
    `transactionId` -
  Throws:
    `JMSException`

### rollbackTransaction

    public void rollbackTransaction(BrokerClient client,
                                    String transactionId)
                             throws JMSException

  rollback a transaction

  Parameters:
    `client` -
    `transactionId` -
  Throws:
    `JMSException`

### startTransaction

    public void startTransaction(BrokerClient client,
                                 ActiveMQXid xid)
                          throws XAException

  Parameters:
    `client` -
    `xid` -
  Throws:
    `XAException`

### prepareTransaction

    public int prepareTransaction(BrokerClient client,
                                  ActiveMQXid xid)
                           throws XAException

  Parameters:
    `client` -
    `xid` -
  Returns:
  Throws:
    `XAException`

### rollbackTransaction

    public void rollbackTransaction(BrokerClient client,
                                    ActiveMQXid xid)
                             throws XAException

  Parameters:
    `client` -
    `xid` -
  Throws:
    `XAException`

### commitTransaction

    public void commitTransaction(BrokerClient client,
                                  ActiveMQXid xid,
                                  boolean onePhase)
                           throws XAException

  Parameters:
    `client` -
    `xid` -
    `onePhase` -
  Throws:
    `XAException`

### getTempDir

    public File getTempDir()

  Get a temp directory - used for spooling

  Returns:
    a File ptr to the directory

### getBrokerName

    public String getBrokerName()

  Returns:
    the name of the Broker

### getBrokerClusterName

    public String getBrokerClusterName()

  Returns:
    the name of the cluster the broker belongs to

### getPersistenceAdapter

    public PersistenceAdapter getPersistenceAdapter()

  Returns:
    the PersistenceAdaptor

### setPersistenceAdapter

    public void setPersistenceAdapter(PersistenceAdapter persistenceAdapter)

  set the persistence adaptor

  Parameters:
    `persistenceAdapter` -

### getContainerManagerMap

    public Map getContainerManagerMap()

  Returns:
    a map, indexed by name of the container managers

### getDestinationContext

    public Context getDestinationContext(Hashtable environment)

  Returns the naming context of the destinations available in this broker

  Parameters:
    `environment` -
  Returns:
    the context

### addConsumerInfoListener

    public void addConsumerInfoListener(ConsumerInfoListener l)

  Add a ConsumerInfoListener to the Broker

  Parameters:
    `l` -

### removeConsumerInfoListener

    public void removeConsumerInfoListener(ConsumerInfoListener l)

  Remove a ConsumerInfoListener from the Broker

  Parameters:
    `l` -

### getPersistentTopicContainerManager

    public MessageContainerManager getPersistentTopicContainerManager()

  Returns:
    the MessageContainerManager for durable topics

### getTransientTopicContainerManager

    public MessageContainerManager getTransientTopicContainerManager()

  Returns:
    the MessageContainerManager for transient topics

### getPersistentQueueContainerManager

    public MessageContainerManager getPersistentQueueContainerManager()

  Returns:
    the MessageContainerManager for persistent queues

### getTransientQueueContainerManager

    public MessageContainerManager getTransientQueueContainerManager()

  Returns:
    the MessageContainerManager for transient queues

### getSecurityAdapter

    public SecurityAdapter getSecurityAdapter()

  Returns the security adapter used to authenticate and authorize access to JMS resources

### setSecurityAdapter

    public void setSecurityAdapter(SecurityAdapter securityAdapter)

  Sets the security adapter used to authenticate and authorize access to JMS resources

### getRedeliveryPolicy

    public RedeliveryPolicy getRedeliveryPolicy()

### setRedeliveryPolicy

    public void setRedeliveryPolicy(RedeliveryPolicy redeliveryPolicy)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 Protique, Ltd.. All Rights Reserved.