org.jboss.messaging.core
Class RouterSupport
java.lang.Object
org.jboss.messaging.core.RouterSupport
- All Implemented Interfaces:
- Distributor, Router
- public abstract class RouterSupport
- extends java.lang.Object
- implements Router
Does Receiver management but it stops short of enforcing any routing policy, leaving it to
subclasses.
- Version:
- $Revision: 403 $
- Author:
- Ovidiu Feodorov
Constructor Summary |
protected |
RouterSupport(java.io.Serializable id)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jboss.messaging.core.Router |
handle |
receivers
protected java.util.Map receivers
- map
id
protected java.io.Serializable id
log
protected Logger log
passByReference
protected boolean passByReference
RouterSupport
protected RouterSupport(java.io.Serializable id)
getRouterID
public java.io.Serializable getRouterID()
handle
public java.util.Set handle(DeliveryObserver o,
Routable r)
isPassByReference
public boolean isPassByReference()
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.
get
public Receiver get(java.io.Serializable receiverID)
remove
public Receiver remove(java.io.Serializable receiverID)
contains
public boolean contains(java.io.Serializable receiverID)
iterator
public java.util.Iterator iterator()
- Specified by:
iterator
in interface Distributor
- Returns:
- an iterator of local receivers
clear
public void clear()
- Description copied from interface:
Distributor
- Remove all receivers.
- Specified by:
clear
in interface Distributor
iterator
protected java.util.Iterator iterator(java.util.Set receiverIDs)
- Returns:
- the intersection between the current receiverID set and the given receiverID set.
Copyright © 2006 JBoss Inc. All Rights Reserved.