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.impl
Class ProxyMessageContainerManager

    java.lang.Object
      org.codehaus.activemq.service.impl.ProxyMessageContainerManager

All Implemented Interfaces:
  MessageContainerManager, Service

Direct Known Subclasses:
  InitialImageMessageContainerManager

public abstract class ProxyMessageContainerManager
extends java.lang.Object
implements MessageContainerManager

A Proxy implementation of `MessageContainerManager` which delegates to some other implementation which is useful for writing Facade implementations

Version:
  $Revision: 1.4 $

Constructor Summary
`ProxyMessageContainerManager()`
`ProxyMessageContainerManager(MessageContainerManager delegate)`

Method Summary
`void` | `acknowledgeMessage(BrokerClient client, MessageAck ack)` Acknowledge a message as being read and consumed by the Consumer
`void` | `acknowledgeTransactedMessage(BrokerClient client, java.lang.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, java.lang.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(java.lang.String clientId, java.lang.String subscriberName)` Delete a durable subscriber
`MessageContainer` | `getContainer(java.lang.String physicalName)` Allows the lookup of a specific named message container
`protected MessageContainerManager` | `getDelegate()`
`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, java.lang.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)`
`protected void` | `setDelegate(MessageContainerManager delegate)`
`void` | `start()` Called to start the service
`void` | `stop()` Called to shutdown the service

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ProxyMessageContainerManager

    public ProxyMessageContainerManager()

### ProxyMessageContainerManager

    public ProxyMessageContainerManager(MessageContainerManager delegate)

Method Detail

### acknowledgeMessage

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

  Description copied from interface: `MessageContainerManager`
  Acknowledge a message as being read and consumed by the Consumer

  Specified by:
    `acknowledgeMessage` in interface `MessageContainerManager`
  Parameters:
    `client` -
    `ack` -
  Throws:
    `JMSException`

### acknowledgeTransactedMessage

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

  Description copied from interface: `MessageContainerManager`
  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()

  Specified by:
    `acknowledgeTransactedMessage` in interface `MessageContainerManager`
  Throws:
    `JMSException`

### redeliverMessage

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

  Description copied from interface: `MessageContainerManager`
  Called after a rollback of a JMS transaction to redeliver the message to the consumers dispatch queue

  Specified by:
    `redeliverMessage` in interface `MessageContainerManager`
  Parameters:
    `client` -
    `ack` -
  Throws:
    `JMSException`

### addMessageConsumer

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

  Specified by:
    `addMessageConsumer` in interface `MessageContainerManager`
  Parameters:
    `client` -
    `info` -
  Throws:
    `JMSException`

### commitTransaction

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

  Description copied from interface: `MessageContainerManager`
  A hook when the transaction is about to be commited; so apply all outstanding commands to the Journal if using a Journal (transaction log)

  Specified by:
    `commitTransaction` in interface `MessageContainerManager`
  Parameters:
    `client` -
    `transactionId` -
  Throws:
    `JMSException`

### deleteSubscription

    public void deleteSubscription(java.lang.String clientId,
                                   java.lang.String subscriberName)
                            throws JMSException

  Description copied from interface: `MessageContainerManager`
  Delete a durable subscriber

  Specified by:
    `deleteSubscription` in interface `MessageContainerManager`
  Parameters:
    `clientId` -
    `subscriberName` -
  Throws:
    `JMSException` - if the subscriber doesn't exist or is still active

### poll

    public void poll()
              throws JMSException

  Description copied from interface: `MessageContainerManager`
  Poll for messages

  Specified by:
    `poll` in interface `MessageContainerManager`
  Throws:
    `JMSException`

### removeMessageConsumer

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

  Specified by:
    `removeMessageConsumer` in interface `MessageContainerManager`
  Parameters:
    `client` -
    `info` -
  Throws:
    `JMSException`

### rollbackTransaction

    public void rollbackTransaction(BrokerClient client,
                                    java.lang.String transactionId)

  Description copied from interface: `MessageContainerManager`
  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

  Specified by:
    `rollbackTransaction` in interface `MessageContainerManager`
  Parameters:
    `client` -
    `transactionId` -

### sendMessage

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

  Specified by:
    `sendMessage` in interface `MessageContainerManager`
  Parameters:
    `client` -
    `message` -
  Throws:
    `JMSException`

### getContainer

    public MessageContainer getContainer(java.lang.String physicalName)
                                  throws JMSException

  Description copied from interface: `MessageContainerManager`
  Allows the lookup of a specific named message container

  Specified by:
    `getContainer` in interface `MessageContainerManager`
  Parameters:
    `physicalName` -
  Returns:
  Throws:
    `JMSException`

### start

    public void start()
               throws JMSException

  Description copied from interface: `Service`
  Called to start the service

  Specified by:
    `start` in interface `Service`
  Throws:
    `JMSException`

### stop

    public void stop()
              throws JMSException

  Description copied from interface: `Service`
  Called to shutdown the service

  Specified by:
    `stop` in interface `Service`
  Throws:
    `JMSException`

### getDelegate

    protected MessageContainerManager getDelegate()

### setDelegate

    protected void setDelegate(MessageContainerManager delegate)

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.