Class WildcardAddressManager
java.lang.Object
org.apache.activemq.artemis.core.postoffice.impl.SimpleAddressManager
org.apache.activemq.artemis.core.postoffice.impl.WildcardAddressManager
- All Implemented Interfaces:
AddressManager
extends the simple manager to allow wildcard addresses to be used.
-
Field Summary
Fields inherited from class org.apache.activemq.artemis.core.postoffice.impl.SimpleAddressManager
mappings, metricsManager, wildcardConfiguration -
Constructor Summary
ConstructorsConstructorDescriptionWildcardAddressManager(BindingsFactory bindingsFactory, WildcardConfiguration wildcardConfiguration, StorageManager storageManager, MetricsManager metricsManager) WildcardAddressManager(BindingsFactory bindingsFactory, StorageManager storageManager, MetricsManager metricsManager) -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddBinding(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 matching addresses.protected voidbindingsEmpty(SimpleString realAddress, Bindings bindings) voidclear()getBindingsForRoutingAddress(SimpleString address) removeBinding(SimpleString uniqueName, Transaction tx) This will use a Transaction as we need to confirm the queue was removedMethods inherited from class org.apache.activemq.artemis.core.postoffice.impl.SimpleAddressManager
addAddressInfo, addMappingInternal, addMappingsInternal, checkAutoRemoveAddress, findLocalBinding, getAddresses, getAddressInfo, getBinding, getBindings, getDirectBindings, getExistingBindingsForRoutingAddress, getMatchingBindings, getMatchingQueue, getMatchingQueue, reloadAddressInfo, removeAddressInfo, removeBindingInternal, scanAddresses, updateAddressInfo
-
Constructor Details
-
WildcardAddressManager
public WildcardAddressManager(BindingsFactory bindingsFactory, WildcardConfiguration wildcardConfiguration, StorageManager storageManager, MetricsManager metricsManager) -
WildcardAddressManager
public WildcardAddressManager(BindingsFactory bindingsFactory, StorageManager storageManager, MetricsManager metricsManager)
-
-
Method Details
-
getBindingsForRoutingAddress
- Specified by:
getBindingsForRoutingAddressin interfaceAddressManager- Overrides:
getBindingsForRoutingAddressin classSimpleAddressManager- Throws:
Exception
-
addBinding
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 matching addresses. If the address is non wildcard, then we need to add any existing matching wildcard bindings to this address the first time we see it.- Specified by:
addBindingin interfaceAddressManager- Overrides:
addBindingin classSimpleAddressManager- Parameters:
binding- the binding to add- Returns:
- true if the address was a new mapping
- Throws:
Exception
-
removeBinding
Description copied from interface:AddressManagerThis will use a Transaction as we need to confirm the queue was removed- Specified by:
removeBindingin interfaceAddressManager- Overrides:
removeBindingin classSimpleAddressManager- Throws:
Exception
-
bindingsEmpty
- Overrides:
bindingsEmptyin classSimpleAddressManager
-
clear
public void clear()- Specified by:
clearin interfaceAddressManager- Overrides:
clearin classSimpleAddressManager
-
getAddressMap
-