org.jboss.messaging.core.postoffice.impl
Class WildcardAddressManager

java.lang.Object
  extended by org.jboss.messaging.core.postoffice.impl.SimpleAddressManager
      extended by org.jboss.messaging.core.postoffice.impl.WildcardAddressManager
All Implemented Interfaces:
AddressManager

public class WildcardAddressManager
extends SimpleAddressManager

extends the simple manager to allow wildcard addresses to be used.

Author:
Andy Taylor

Constructor Summary
WildcardAddressManager()
           
 
Method Summary
 boolean addBinding(Binding binding)
          If the address to add the binding to contains a wildcard then a copy of the binding (with the same underlying queue) will be added to the actual mappings.
 void clear()
           
 Bindings getBindingsForRoutingAddress(SimpleString address)
           
 Binding removeBinding(SimpleString uniqueName)
          If the address is a wild card then the binding will be removed from the actual mappings for any linked address.
 
Methods inherited from class org.jboss.messaging.core.postoffice.impl.SimpleAddressManager
addMappingInternal, getBinding, getBindings, getMatchingBindings, removeBindingInternal, removeMapping
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WildcardAddressManager

public WildcardAddressManager()
Method Detail

getBindingsForRoutingAddress

public Bindings getBindingsForRoutingAddress(SimpleString address)
Specified by:
getBindingsForRoutingAddress in interface AddressManager
Overrides:
getBindingsForRoutingAddress in class SimpleAddressManager

addBinding

public boolean addBinding(Binding binding)
If the address to add the binding to contains a wildcard then a copy of the binding (with the same underlying queue) will be added to the actual mappings. Otherwise the binding is added as normal.

Specified by:
addBinding in interface AddressManager
Overrides:
addBinding in class SimpleAddressManager
Parameters:
binding - the binding to add
Returns:
true if the address was a new mapping

removeBinding

public Binding removeBinding(SimpleString uniqueName)
If the address is a wild card then the binding will be removed from the actual mappings for any linked address. otherwise it will be removed as normal.

Specified by:
removeBinding in interface AddressManager
Overrides:
removeBinding in class SimpleAddressManager
Parameters:
uniqueName - the name of the binding to remove
Returns:
true if this was the last mapping for a specific address

clear

public void clear()
Specified by:
clear in interface AddressManager
Overrides:
clear in class SimpleAddressManager


Copyright © 2006 JBoss Inc. All Rights Reserved.