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 MessageContainer

All Superinterfaces:
  Service

All Known Subinterfaces:
  QueueMessageContainer, TopicMessageContainer

All Known Implementing Classes:
  DurableQueueMessageContainer, DurableTopicMessageContainer, TransientQueueBoundedMessageContainer, TransientTopicBoundedMessageContainer

public interface MessageContainer
extends Service

A MessageContainer holds the messages for a particular destination

Version:
  $Revision: 1.11 $

Method Summary
`MessageIdentity` | `addMessage(ActiveMQMessage msg)` Add an ActiveMQMessage to the message container
`boolean` | `containsMessage(MessageIdentity messageIdentity)` Returns whether or not this container contains the given message identity which provides an optimisation over getMessage() where the message does not need to be loaded.
`void` | `delete(MessageIdentity messageIdentity, MessageAck ack)` Delete a message - if no
`String` | `getDestinationName()`
`ActiveMQMessage` | `getMessage(MessageIdentity messageIdentity)` Return the ActiveMQMessage that matches the Id
`void` | `registerMessageInterest(MessageIdentity messageIdentity)` Register that a consumer will be interested in this message
`void` | `unregisterMessageInterest(MessageIdentity messageIdentity, MessageAck ack)` A message consumer calls this when it's no longer interested in a message so that we know when we can delete (or archive) it

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

Method Detail

### getDestinationName

    public String getDestinationName()

  Returns:
    the destinationName of the Container

### addMessage

    public MessageIdentity addMessage(ActiveMQMessage msg)
                               throws JMSException

  Add an ActiveMQMessage to the message container

  Parameters:
    `msg` -
  Throws:
    `JMSException`

### delete

    public void delete(MessageIdentity messageIdentity,
                       MessageAck ack)
                throws JMSException

  Delete a message - if no

  Parameters:
    `messageIdentity` -
    `ack` -
  Throws:
    `JMSException`

### getMessage

    public ActiveMQMessage getMessage(MessageIdentity messageIdentity)
                               throws JMSException

  Return the ActiveMQMessage that matches the Id

  Parameters:
    `messageIdentity` -
  Returns:
    the message or null
  Throws:
    `JMSException`

### registerMessageInterest

    public void registerMessageInterest(MessageIdentity messageIdentity)
                                 throws JMSException

  Register that a consumer will be interested in this message

  Parameters:
    `messageIdentity` -
  Throws:
    `JMSException`

### unregisterMessageInterest

    public void unregisterMessageInterest(MessageIdentity messageIdentity,
                                          MessageAck ack)
                                   throws JMSException

  A message consumer calls this when it's no longer interested in a message so that we know when we can delete (or archive) it

  Parameters:
    `messageIdentity` -
    `ack` -
  Throws:
    `JMSException`

### containsMessage

    public boolean containsMessage(MessageIdentity messageIdentity)
                            throws JMSException

  Returns whether or not this container contains the given message identity which provides an optimisation over getMessage() where the message does not need to be loaded.

  Parameters:
    `messageIdentity` -
  Returns:
    true if the container contains the given message
  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.