org.jboss.messaging.core.local
Class SingleDestinationRouter

java.lang.Object
  extended byorg.jboss.messaging.core.local.SingleDestinationRouter
All Implemented Interfaces:
Distributor, Router

public class SingleDestinationRouter
extends java.lang.Object
implements Router

Version:
$Revision: 1328 $ $Id: SingleDestinationRouter.java 1328 2006-09-20 21:10:48Z ovidiu.feodorov@jboss.com $
Author:
Ovidiu Feodorov

Field Summary
protected  Receiver receiver
           
 
Constructor Summary
SingleDestinationRouter()
           
 
Method Summary
 boolean add(Receiver r)
          Add a local receiver to this distributor.
 void clear()
          Remove all receivers.
 boolean contains(Receiver r)
           
 java.util.Set handle(DeliveryObserver observer, Routable routable, Transaction tx)
          Returns a set of Delivery instances.
 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
 

Field Detail

receiver

protected Receiver receiver
Constructor Detail

SingleDestinationRouter

public SingleDestinationRouter()
Method Detail

handle

public java.util.Set handle(DeliveryObserver observer,
                            Routable routable,
                            Transaction tx)
Description copied from interface: Router
Returns a set of Delivery instances.

Specified by:
handle in interface Router

add

public boolean add(Receiver r)
Description copied from interface: Distributor
Add a local receiver to this distributor.

Specified by:
add in interface 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 r)
Description copied from interface: Distributor
Remove a local receiver from this distributor.

Specified by:
remove in interface Distributor
Returns:
true if this distributor contained the specified receiver.

clear

public void clear()
Description copied from interface: Distributor
Remove all receivers.

Specified by:
clear in interface Distributor

contains

public boolean contains(Receiver r)
Specified by:
contains in interface Distributor

iterator

public java.util.Iterator iterator()
Specified by:
iterator in interface Distributor
Returns:
an iterator of local receivers


Copyright © 2006 JBoss Inc. All Rights Reserved.