org.jboss.messaging.channel.plugins.handler
Class SharedChannelHandler

java.lang.Object
  extended byorg.jboss.messaging.channel.plugins.handler.AbstractChannelHandler (src) 
      extended byorg.jboss.messaging.channel.plugins.handler.SharedChannelHandler
All Implemented Interfaces:
ChannelHandler (src) , Consumer (src)

public class SharedChannelHandler
extends AbstractChannelHandler (src)

A channel handler that has multiple consumers


Field Summary
 
Fields inherited from class org.jboss.messaging.channel.plugins.handler.AbstractChannelHandler (src)
messages
 
Constructor Summary
SharedChannelHandler(MessageSet (src)  messages)
          Create a new SharedChannelHandler.
 
Method Summary
protected  void addConsumer(Consumer (src)  consumer, long wait)
          Add a consumer
protected  Consumer (src) findConsumer(MessageReference (src)  reference)
          Find a consumer for a message
protected  void removeConsumer(Consumer (src)  consumer)
          Remove a consumer
 
Methods inherited from class org.jboss.messaging.channel.plugins.handler.AbstractChannelHandler (src)
accepts, addMessage, onMessage, removeMessage, stopWaitMessage, waitMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SharedChannelHandler

public SharedChannelHandler(MessageSet (src)  messages)
Create a new SharedChannelHandler.

Parameters:
messages - the message set
Method Detail

addConsumer

protected void addConsumer(Consumer (src)  consumer,
                           long wait)
Description copied from class: AbstractChannelHandler (src)
Add a consumer

Specified by:
addConsumer in class AbstractChannelHandler (src)
Parameters:
consumer - the consumer to wait for a message
wait - the length of time to wait

findConsumer

protected Consumer (src)  findConsumer(MessageReference (src)  reference)
Description copied from class: AbstractChannelHandler (src)
Find a consumer for a message

Specified by:
findConsumer in class AbstractChannelHandler (src)
Parameters:
reference - the message
Returns:
the consumer or null if there are none for the message

removeConsumer

protected void removeConsumer(Consumer (src)  consumer)
Description copied from class: AbstractChannelHandler (src)
Remove a consumer

Specified by:
removeConsumer in class AbstractChannelHandler (src)
Parameters:
consumer - the consumer to remove