org.jboss.messaging.core
Interface Distributor

All Known Subinterfaces:
Channel, ClusteredQueue, ClusterRouter, Queue, Router
All Known Implementing Classes:
ChannelSupport, DefaultRouter, FirstReceiverPointToPointRouter, LocalClusteredQueue, PagingFilteredQueue, RemoteQueueStub, RoundRobinPointToPointRouter, RoundRobinRouter

public interface Distributor

An interface for Receiver management. Distributes a reference to a maximum of one of the attached receivers

Author:
Ovidiu Feodorov, Tim Fox $Id: Distributor.java 1930 2007-01-09 18:16:04Z timfox $

Method Summary
 boolean add(Receiver receiver)
          Add a local receiver to this distributor.
 void clear()
          Remove all receivers.
 boolean contains(Receiver receiver)
           
 int getNumberOfReceivers()
           
 java.util.Iterator iterator()
           
 boolean remove(Receiver receiver)
          Remove a local receiver from this distributor.
 

Method Detail

contains

public boolean contains(Receiver receiver)

iterator

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

add

public 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

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

Returns:
true if this distributor contained the specified receiver.

clear

public void clear()
Remove all receivers.


getNumberOfReceivers

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


Copyright © 2006 JBoss Inc. All Rights Reserved.