TransientQueueBoundedMessageContainer (ActiveMQ 1.1 API)
Keywords: org.codehaus.activemq.service.boundedvm.TransientQueueBoundedMessageContainer class

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.boundedvm
Class TransientQueueBoundedMessageContainer

    java.lang.Object
      org.codehaus.activemq.service.boundedvm.TransientQueueBoundedMessageContainer

All Implemented Interfaces:
  MessageContainer, Runnable, Service

public class TransientQueueBoundedMessageContainer
extends Object
implements MessageContainer, Service, Runnable

A MessageContainer for transient queues

Version:
  $Revision: 1.6 $

Constructor Summary
`TransientQueueBoundedMessageContainer(MemoryBoundedQueueManager queueManager, ActiveMQDestination destination)` Construct this beast

Method Summary
`TransientQueueSubscription` | `addConsumer(Filter filter, ConsumerInfo info, BrokerClient client)` Add a consumer to dispatch messages to
`MessageIdentity` | `addMessage(ActiveMQMessage msg)` Add an ActiveMQMessage to the message container
`protected void` | `clear()`
`void` | `close()` close down this 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
`void` | `enqueue(ActiveMQMessage message)` enqueue a message for dispatching
`void` | `enqueueFirst(ActiveMQMessage message)` enqueue a message for dispatching
`ActiveMQDestination` | `getDestination()`
`String` | `getDestinationName()`
`ActiveMQMessage` | `getMessage(MessageIdentity messageIdentity)` Return the ActiveMQMessage that matches the Id
`protected boolean` | `hasActiveSubscribers()`
`boolean` | `isInactive()`
`void` | `registerMessageInterest(MessageIdentity messageIdentity)` Register that a consumer will be interested in this message
`void` | `removeConsumer(ConsumerInfo info)` Remove a consumer
`protected void` | `removeExpiredMessages()`
`void` | `run()` do some dispatching
`void` | `start()` start working
`void` | `stop()` stop working
`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 class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TransientQueueBoundedMessageContainer

    public TransientQueueBoundedMessageContainer(MemoryBoundedQueueManager queueManager,
                                                 ActiveMQDestination destination)

  Construct this beast

Parameters:
  `queueManager` -
  `destination` -

Method Detail

### isInactive

    public boolean isInactive()

  Returns:
    true if this Container has no active subscriptions and there are no messages to dispatch

### addConsumer

    public TransientQueueSubscription addConsumer(Filter filter,
                                                  ConsumerInfo info,
                                                  BrokerClient client)
                                           throws JMSException

  Add a consumer to dispatch messages to

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

### removeConsumer

    public void removeConsumer(ConsumerInfo info)
                        throws JMSException

  Remove a consumer

  Parameters:
    `info` -
  Throws:
    `JMSException`

### start

    public void start()

  start working

  Specified by:
    `start` in interface `Service`

### enqueue

    public void enqueue(ActiveMQMessage message)

  enqueue a message for dispatching

  Parameters:
    `message` -

### enqueueFirst

    public void enqueueFirst(ActiveMQMessage message)

  enqueue a message for dispatching

  Parameters:
    `message` -

### stop

    public void stop()

  stop working

  Specified by:
    `stop` in interface `Service`

### close

    public void close()
               throws JMSException

  close down this container

  Throws:
    `JMSException`

### run

    public void run()

  do some dispatching

  Specified by:
    `run` in interface `Runnable`

### getDestination

    public ActiveMQDestination getDestination()

  Returns:
    the destination associated with this container

### getDestinationName

    public String getDestinationName()

  Specified by:
    `getDestinationName` in interface `MessageContainer`
  Returns:
    the destination name

### addMessage

    public MessageIdentity addMessage(ActiveMQMessage msg)
                               throws JMSException

  Description copied from interface: `MessageContainer`
  Add an ActiveMQMessage to the message container

  Specified by:
    `addMessage` in interface `MessageContainer`
  Parameters:
    `msg` -
  Returns:
  Throws:
    `JMSException`

### delete

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

  Description copied from interface: `MessageContainer`
  Delete a message - if no

  Specified by:
    `delete` in interface `MessageContainer`
  Parameters:
    `messageIdentity` -
    `ack` -
  Throws:
    `JMSException`

### getMessage

    public ActiveMQMessage getMessage(MessageIdentity messageIdentity)
                               throws JMSException

  Description copied from interface: `MessageContainer`
  Return the ActiveMQMessage that matches the Id

  Specified by:
    `getMessage` in interface `MessageContainer`
  Parameters:
    `messageIdentity` -
  Returns:
  Throws:
    `JMSException`

### registerMessageInterest

    public void registerMessageInterest(MessageIdentity messageIdentity)
                                 throws JMSException

  Description copied from interface: `MessageContainer`
  Register that a consumer will be interested in this message

  Specified by:
    `registerMessageInterest` in interface `MessageContainer`
  Parameters:
    `messageIdentity` -
  Throws:
    `JMSException`

### unregisterMessageInterest

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

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

  Specified by:
    `unregisterMessageInterest` in interface `MessageContainer`
  Parameters:
    `messageIdentity` -
    `ack` -
  Throws:
    `JMSException`

### containsMessage

    public boolean containsMessage(MessageIdentity messageIdentity)
                            throws JMSException

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

  Specified by:
    `containsMessage` in interface `MessageContainer`
  Parameters:
    `messageIdentity` -
  Returns:
  Throws:
    `JMSException`

### hasActiveSubscribers

    protected boolean hasActiveSubscribers()

### clear

    protected void clear()

### removeExpiredMessages

    protected void removeExpiredMessages()

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.