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.service
Interface MessageContainerManager

All Superinterfaces:
  Service

All Known Implementing Classes:
  MessageContainerManagerSupport, ProxyMessageContainerManager, TransientQueueBoundedMessageManager, TransientTopicBoundedMessageManager

public interface MessageContainerManager
extends Service

A manager of MessageContainer instances

Method Summary
`void` | `acknowledgeMessage(BrokerClient client, MessageAck ack)` Acknowledge a message as being read and consumed by the Consumer
`void` | `acknowledgeTransactedMessage(BrokerClient client, String transactionId, MessageAck ack)` This is a hook to notify the dispatcher for the clients subscription that we have acknowledged a message within a transaction but before the commit - so the message is not really being acknowledged here but this method is intended to be a hook to let the dispatcher know that we can now send another message to the client.
`void` | `addMessageConsumer(BrokerClient client, ConsumerInfo info)`
`void` | `commitTransaction(BrokerClient client, String transactionId)` A hook when the transaction is about to be commited; so apply all outstanding commands to the Journal if using a Journal (transaction log)
`void` | `deleteSubscription(String clientId, String subscriberName)` Delete a durable subscriber
`MessageContainer` | `getContainer(String physicalName)` Allows the lookup of a specific named message container
`Map` | `getDestinations()` Returns an unmodifiable map, indexed by String name, of all the `Destination` objects available in this container
`void` | `poll()` Poll for messages
`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)`
`void` | `rollbackTransaction(BrokerClient client, String transactionId)` A hook when the transaction is about to be rolled back; so discard all outstanding commands that are pending to be written to the Journal
`void` | `sendMessage(BrokerClient client, ActiveMQMessage message)`

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

Method Detail

### getDestinations

    public Map getDestinations()

  Returns an unmodifiable map, indexed by String name, of all the `Destination` objects available in this container

  Returns:

### addMessageConsumer

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

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

### removeMessageConsumer

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

  Parameters:
    `client` -
    `info` -
  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

### sendMessage

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

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

### acknowledgeMessage

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

  Acknowledge a message as being read and consumed by the Consumer

  Parameters:
    `client` -
    `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`

### poll

    public void poll()
              throws JMSException

  Poll for messages

  Throws:
    `JMSException`

### commitTransaction

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

  A hook when the transaction is about to be commited; so apply all outstanding commands to the Journal if using a Journal (transaction log)

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

### rollbackTransaction

    public void rollbackTransaction(BrokerClient client,
                                    String transactionId)

  A hook when the transaction is about to be rolled back; so discard all outstanding commands that are pending to be written to the Journal

  Parameters:
    `client` -
    `transactionId` -

### getContainer

    public MessageContainer getContainer(String physicalName)
                                  throws JMSException

  Allows the lookup of a specific named message container

  Parameters:
    `physicalName` -
  Returns:
  Throws:
    `JMSException`

### acknowledgeTransactedMessage

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

  This is a hook to notify the dispatcher for the clients subscription that we have acknowledged a message within a transaction but before the commit - so the message is not really being acknowledged here but this method is intended to be a hook to let the dispatcher know that we can now send another message to the client.

  Without this hook, if we have a prefetch value of 1, we can never consume 2 messages in a transaction, since the ack for the first message never arrives until the commit()

  Throws:
    `JMSException`

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.