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

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

public class ExclusiveChannelHandler
extends AbstractChannelHandler (src)

A channel handler that has only one consumer


Field Summary
 
Fields inherited from class org.jboss.messaging.channel.plugins.handler.AbstractChannelHandler (src)
messages
 
Constructor Summary
ExclusiveChannelHandler(MessageSet (src)  messages)
          Create a new ExclusiveChannelHandler.
 
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

ExclusiveChannelHandler

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

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