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 TransientTopicBoundedMessageContainer

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

All Implemented Interfaces:
  MessageContainer, Runnable, Service

public class TransientTopicBoundedMessageContainer
extends Object
implements MessageContainer, Service, Runnable

A MessageContainer for transient topics One of these exists for every active Connection consuming transient Topic messages

Version:
  $Revision: 1.7 $

Constructor Summary
`TransientTopicBoundedMessageContainer(BrokerClient client, BoundedPacketQueue queue)` Construct this beast

Method Summary
`void` | `addConsumer(Filter filter, ConsumerInfo info)` Add a consumer to dispatch messages to
`MessageIdentity` | `addMessage(ActiveMQMessage msg)` Add an ActiveMQMessage to the message container
`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
`BrokerClient` | `getBrokerClient()`
`String` | `getDestinationName()`
`ActiveMQMessage` | `getMessage(MessageIdentity messageIdentity)` Return the ActiveMQMessage that matches the Id
`boolean` | `hasConsumerFor(ActiveMQDestination destination)`
`boolean` | `isInactive()`
`void` | `registerMessageInterest(MessageIdentity messageIdentity)` Register that a consumer will be interested in this message
`void` | `removeConsumer(ConsumerInfo info)` Remove a consumer
`void` | `run()` do some dispatching
`void` | `start()` start working
`void` | `stop()` stop working
`boolean` | `targetAndDispatch(BrokerClient sender, ActiveMQMessage message)` See if this container should get this message and dispatch it
`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

### TransientTopicBoundedMessageContainer

    public TransientTopicBoundedMessageContainer(BrokerClient client,
                                                 BoundedPacketQueue queue)

  Construct this beast

Parameters:
  `client` -
  `queue` -

Method Detail

### isInactive

    public boolean isInactive()

  Returns:
    true if this Container has no active subscriptions

### getBrokerClient

    public BrokerClient getBrokerClient()

  Returns:
    the BrokerClient this Container is dispatching to

### addConsumer

    public void addConsumer(Filter filter,
                            ConsumerInfo info)

  Add a consumer to dispatch messages to

  Parameters:
    `filter` -
    `info` -

### removeConsumer

    public void removeConsumer(ConsumerInfo info)

  Remove a consumer

  Parameters:
    `info` -

### start

    public void start()

  start working

  Specified by:
    `start` in interface `Service`

### targetAndDispatch

    public boolean targetAndDispatch(BrokerClient sender,
                                     ActiveMQMessage message)
                              throws JMSException

  See if this container should get this message and dispatch it

  Parameters:
    `sender` - the BrokerClient the message came from
    `message` -
  Returns:
    true if it is a valid container
  Throws:
    `JMSException`

### stop

    public void stop()

  stop working

  Specified by:
    `stop` in interface `Service`

### close

    public void close()

  close down this container

### run

    public void run()

  do some dispatching

  Specified by:
    `run` in interface `Runnable`

### hasConsumerFor

    public boolean hasConsumerFor(ActiveMQDestination destination)

  Parameters:
    `destination` -
  Returns:
    true if a

### 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
  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
  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
  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.