org.jboss.messaging.core.server.impl
Class RoundRobinDistributor

java.lang.Object
  extended by org.jboss.messaging.core.server.impl.DistributorImpl
      extended by org.jboss.messaging.core.server.impl.RoundRobinDistributor
All Implemented Interfaces:
Distributor
Direct Known Subclasses:
GroupingRoundRobinDistributor

public class RoundRobinDistributor
extends DistributorImpl

A RoundRobinDistributor

Author:
Tim Fox, Andy Taylor

Field Summary
protected  int pos
           
 
Fields inherited from class org.jboss.messaging.core.server.impl.DistributorImpl
consumers
 
Constructor Summary
RoundRobinDistributor()
           
 
Method Summary
 void addConsumer(Consumer consumer)
           
 HandleStatus distribute(MessageReference reference)
           
 int getConsumerCount()
           
protected  HandleStatus handle(MessageReference reference, Consumer consumer)
           
protected  void incrementPosition()
           
 boolean removeConsumer(Consumer consumer)
           
 
Methods inherited from class org.jboss.messaging.core.server.impl.DistributorImpl
getConsumers, hasConsumers
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pos

protected int pos
Constructor Detail

RoundRobinDistributor

public RoundRobinDistributor()
Method Detail

addConsumer

public void addConsumer(Consumer consumer)
Specified by:
addConsumer in interface Distributor
Overrides:
addConsumer in class DistributorImpl

removeConsumer

public boolean removeConsumer(Consumer consumer)
Specified by:
removeConsumer in interface Distributor
Overrides:
removeConsumer in class DistributorImpl

getConsumerCount

public int getConsumerCount()
Specified by:
getConsumerCount in interface Distributor
Overrides:
getConsumerCount in class DistributorImpl

distribute

public HandleStatus distribute(MessageReference reference)

incrementPosition

protected void incrementPosition()

handle

protected HandleStatus handle(MessageReference reference,
                              Consumer consumer)


Copyright © 2006 JBoss Inc. All Rights Reserved.