|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.messaging.core.impl.FirstReceiverDistributor
public class FirstReceiverDistributor
It will always favour the first receiver in the internal list of receivers, but will retry the next one (and the next one...) if a previous one does not want to accept the message. If the router has several receivers (e.g. the case of multiple consumers on a queue) then if the consumers are fast then the first receiver will tend to get most or all of the references
Constructor Summary | |
---|---|
FirstReceiverDistributor()
|
Method Summary | |
---|---|
boolean |
add(Receiver r)
Add a local receiver to this distributor. |
void |
clear()
Remove all receivers. |
boolean |
contains(Receiver r)
Does the distributor already contain the specified Receiver? |
int |
getNumberOfReceivers()
|
Delivery |
handle(DeliveryObserver observer,
MessageReference ref,
Transaction tx)
A receiver can return an active, "done" or null delivery. |
java.util.Iterator |
iterator()
|
boolean |
remove(Receiver r)
Remove a local receiver from this distributor. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FirstReceiverDistributor()
Method Detail |
---|
public Delivery handle(DeliveryObserver observer, MessageReference ref, Transaction tx)
Receiver
handle
in interface Receiver
observer
- - the component the delivery should be acknowledged to.Delivery
,
DeliveryObserver
public boolean add(Receiver r)
Distributor
add
in interface Distributor
public boolean remove(Receiver r)
Distributor
remove
in interface Distributor
public void clear()
Distributor
clear
in interface Distributor
public boolean contains(Receiver r)
Distributor
contains
in interface Distributor
public java.util.Iterator iterator()
iterator
in interface Distributor
public int getNumberOfReceivers()
getNumberOfReceivers
in interface Distributor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |