Class FederationReceiveFromAddressPolicy
java.lang.Object
org.apache.activemq.artemis.protocol.amqp.federation.FederationReceiveFromAddressPolicy
- All Implemented Interfaces:
BiPredicate<String, RoutingType>, FederationReceiveFromResourcePolicy
public class FederationReceiveFromAddressPolicy
extends Object
implements FederationReceiveFromResourcePolicy, BiPredicate<String, RoutingType>
Policy used to provide federation of remote to local broker addresses, once created the policy configuration is
immutable.
-
Constructor Summary
ConstructorsConstructorDescriptionFederationReceiveFromAddressPolicy(String name, boolean autoDelete, long autoDeleteDelay, long autoDeleteMessageCount, int maxHops, boolean enableDivertBindings, Collection<String> includeAddresses, Collection<String> excludeAddresses, Map<String, Object> properties, TransformerConfiguration transformerConfig, WildcardConfiguration wildcardConfig) -
Method Summary
Modifier and TypeMethodDescriptionlonglongintReturns the name assigned to this federation policy.Returns the federation type this policy configuration defines.Returns aMapof properties that were used in the policy configuration.Returns theTransformerConfigurationthat was specified in the policy configuration.booleanbooleanbooleantest(String address, RoutingType type) booleantest(org.apache.activemq.artemis.core.server.impl.AddressInfo addressInfo) Convenience test method for those who have anAddressInfoobject but don't want to deal with theSimpleStringobject or any null checks.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BiPredicate
and, negate, or
-
Constructor Details
-
FederationReceiveFromAddressPolicy
public FederationReceiveFromAddressPolicy(String name, boolean autoDelete, long autoDeleteDelay, long autoDeleteMessageCount, int maxHops, boolean enableDivertBindings, Collection<String> includeAddresses, Collection<String> excludeAddresses, Map<String, Object> properties, TransformerConfiguration transformerConfig, WildcardConfiguration wildcardConfig)
-
-
Method Details
-
getPolicyType
Description copied from interface:FederationReceiveFromResourcePolicyReturns the federation type this policy configuration defines.- Specified by:
getPolicyTypein interfaceFederationReceiveFromResourcePolicy- Returns:
- the federation type this policy configuration defines
-
getPolicyName
Description copied from interface:FederationReceiveFromResourcePolicyReturns the name assigned to this federation policy.- Specified by:
getPolicyNamein interfaceFederationReceiveFromResourcePolicy- Returns:
- the name assigned to this federation policy
-
isAutoDelete
public boolean isAutoDelete() -
getAutoDeleteDelay
public long getAutoDeleteDelay() -
getAutoDeleteMessageCount
public long getAutoDeleteMessageCount() -
getMaxHops
public int getMaxHops() -
isEnableDivertBindings
public boolean isEnableDivertBindings() -
getIncludes
-
getExcludes
-
getProperties
Description copied from interface:FederationReceiveFromResourcePolicyReturns aMapof properties that were used in the policy configuration.- Specified by:
getPropertiesin interfaceFederationReceiveFromResourcePolicy- Returns:
- a
Mapof properties that were used in the policy configuration
-
getTransformerConfiguration
Description copied from interface:FederationReceiveFromResourcePolicyReturns theTransformerConfigurationthat was specified in the policy configuration.- Specified by:
getTransformerConfigurationin interfaceFederationReceiveFromResourcePolicy- Returns:
- the
TransformerConfigurationthat was specified in the policy configuration
-
test
public boolean test(org.apache.activemq.artemis.core.server.impl.AddressInfo addressInfo) Convenience test method for those who have anAddressInfoobject but don't want to deal with theSimpleStringobject or any null checks.- Parameters:
addressInfo- The address info to check which if null will result in a negative result.- Returns:
trueif the address value matches this configured policy
-
test
- Specified by:
testin interfaceBiPredicate<String, RoutingType>
-