QueueMessageContainer (ActiveMQ 1.1 API)
Keywords: org.codehaus.activemq.service.QueueMessageContainer 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.service
Interface QueueMessageContainer

All Superinterfaces:
  MessageContainer, Service

All Known Implementing Classes:
  DurableQueueMessageContainer

public interface QueueMessageContainer
extends MessageContainer

A Queue based `MessageContainer`

Version:
  $Revision: 1.6 $

Method Summary
`ActiveMQMessage` | `peekNext(MessageIdentity messageIdentity)` Used for browsing a MessageContainer this returns the next message in the container after the messageId
`ActiveMQMessage` | `poll()` Some implementations may need to poll to fill subscriptions this returns the next message in the container
`void` | `recoverMessageToBeDelivered(MessageIdentity messageIdentity)` Invoked during the recovery to add the given message to the end of the messages to be delivered.
`void` | `reset()` called to reset dispatch pointers if a new Message Consumer joins
`void` | `returnMessage(MessageIdentity messageIdentity)` After a poll() on the Container, if a message can't be dispatched, it is returned
`void` | `start()` This container has just been loaded from disk and so it needs to be recovered, that is iterate through all the message IDs in the persistent store and add them to the in memory list of message IDs to be dispatched by consumers

Methods inherited from interface org.codehaus.activemq.service.MessageContainer
`addMessage, containsMessage, delete, getDestinationName, getMessage, registerMessageInterest, unregisterMessageInterest`

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

Method Detail

### poll

    public ActiveMQMessage poll()
                         throws JMSException

  Some implementations may need to poll to fill subscriptions this returns the next message in the container

  Returns:
    the next message
  Throws:
    `JMSException`

### peekNext

    public ActiveMQMessage peekNext(MessageIdentity messageIdentity)
                             throws JMSException

  Used for browsing a MessageContainer this returns the next message in the container after the messageId

  Parameters:
    `messageIdentity` - the id if the message. If this is null, the first message will be retrieved
  Returns:
    the next message without updating it's state to being dispatched
  Throws:
    `JMSException`

### returnMessage

    public void returnMessage(MessageIdentity messageIdentity)
                       throws JMSException

  After a poll() on the Container, if a message can't be dispatched, it is returned

  Parameters:
    `messageIdentity` -
  Throws:
    `JMSException`

### reset

    public void reset()
               throws JMSException

  called to reset dispatch pointers if a new Message Consumer joins

  Throws:
    `JMSException`

### start

    public void start()
               throws JMSException

  This container has just been loaded from disk and so it needs to be recovered, that is iterate through all the message IDs in the persistent store and add them to the in memory list of message IDs to be dispatched by consumers

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

### recoverMessageToBeDelivered

    public void recoverMessageToBeDelivered(MessageIdentity messageIdentity)
                                     throws JMSException

  Invoked during the recovery to add the given message to the end of the messages to be delivered.

  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.