org.jboss.messaging.core.contract
Interface Distributor

All Superinterfaces:
Receiver
All Known Implementing Classes:
ClusterRoundRobinDistributor, FirstReceiverDistributor, MessagingQueue.DistributorWrapper, RoundRobinDistributor

public interface Distributor
extends Receiver

A Distributor takes a message and distributes it to one or more Receivers

Author:
Ovidiu Feodorov, Tim Fox $Id: Distributor.java 2868 2007-07-10 20:22:16Z timfox $

Method Summary
 boolean add(Receiver receiver)
          Add a local receiver to this distributor.
 void clear()
          Remove all receivers.
 boolean contains(Receiver receiver)
          Does the distributor already contain the specified Receiver?
 int getNumberOfReceivers()
           
 java.util.Iterator iterator()
           
 boolean remove(Receiver receiver)
          Remove a local receiver from this distributor.
 
Methods inherited from interface org.jboss.messaging.core.contract.Receiver
handle
 

Method Detail

contains

boolean contains(Receiver receiver)
Does the distributor already contain the specified Receiver?

Parameters:
receiver -
Returns:

iterator

java.util.Iterator iterator()
Returns:
an iterator of receivers

add

boolean add(Receiver receiver)
Add a local receiver to this distributor.

Returns:
true if the distributor did not already contain the specified receiver and the receiver was added to the distributor, false otherwise.

remove

boolean remove(Receiver receiver)
Remove a local receiver from this distributor.

Returns:
true if this distributor contained the specified receiver.

clear

void clear()
Remove all receivers.


getNumberOfReceivers

int getNumberOfReceivers()
Returns:
The number of receivers in the distributor


Copyright © 2006 JBoss Inc. All Rights Reserved.