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.7 $

Nested Class Summary

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

Method Summary
`void` | `acknowledgeMessage(BrokerClient client, MessageAck ack)` Acknowledge consumption of a message by the Message Consumer
`void` | `acknowledgeTransactedMessage(BrokerClient client, java.lang.String transactionId, MessageAck ack)` Acknowledge consumption of a message within a transaction
`void` | `addMessageConsumer(BrokerClient client, ConsumerInfo info)` Add an active message consumer
`void` | `cleanUpClient(BrokerClient client)` 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` | `commitTransaction(BrokerClient client, 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
`java.lang.String` | `getBrokerName()`
`PersistenceAdapter` | `getPersistenceAdapter()`
`ActiveMQXid[]` | `getPreparedTransactions(BrokerClient client)` gets a list of all the prepared xa transactions.
`java.io.File` | `getTempDir()` Get a temp directory - used for spooling
`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` | `removeMessageConsumer(BrokerClient client, ConsumerInfo info)` remove an active message consumer
`void` | `rollbackTransaction(BrokerClient client, ActiveMQXid xid)`
`void` | `rollbackTransaction(BrokerClient client, java.lang.String transactionId)` rollback a transaction
`void` | `sendMessage(BrokerClient client, ActiveMQMessage message)` send a message to the broker
`void` | `sendTransactedMessage(BrokerClient client, java.lang.String transactionId, ActiveMQMessage message)` send a message to the broker within a transaction
`void` | `setPersistenceAdapter(PersistenceAdapter persistenceAdapter)`
`void` | `startTransaction(BrokerClient client, ActiveMQXid xid)`
`void` | `startTransaction(BrokerClient client, java.lang.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

### addMessageConsumer

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

  Add an active message consumer

  Parameters:
    `client` -
    `info` -
  Throws:
    `JMSException`

### removeMessageConsumer

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

  remove an active message consumer

  Parameters:
    `client` -
    `info` -
  Throws:
    `JMSException`

### getPreparedTransactions

    public ActiveMQXid[] getPreparedTransactions(BrokerClient client)
                                          throws XAException

  gets a list of all the prepared xa transactions.

  Parameters:
    `client` -
  Throws:
    `XAException`

### acknowledgeMessage

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

  Acknowledge consumption of a message by the Message Consumer

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

### acknowledgeTransactedMessage

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

  Acknowledge consumption of a message within a transaction

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

### 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`

### sendMessage

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

  send a message to the broker

  Parameters:
    `client` -
    `message` -
  Throws:
    `JMSException`

### sendTransactedMessage

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

  send a message to the broker within a transaction

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

### cleanUpClient

    public void cleanUpClient(BrokerClient client)
                       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

  Parameters:
    `client` -
  Throws:
    `JMSException`

### deleteSubscription

    public void deleteSubscription(java.lang.String clientId,
                                   java.lang.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,
                                 java.lang.String transactionId)
                          throws JMSException

  start a transaction

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

### commitTransaction

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

  commit a transaction

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

### rollbackTransaction

    public void rollbackTransaction(BrokerClient client,
                                    java.lang.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` -
  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 java.io.File getTempDir()

  Get a temp directory - used for spooling

  Returns:
    a File ptr to the directory

### getBrokerName

    public java.lang.String getBrokerName()

### getPersistenceAdapter

    public PersistenceAdapter getPersistenceAdapter()

### setPersistenceAdapter

    public void setPersistenceAdapter(PersistenceAdapter persistenceAdapter)

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.