Package org.apache.activemq.plugin.util
Class PolicyEntryUtil
- java.lang.Object
-
- org.apache.activemq.plugin.util.PolicyEntryUtil
-
public class PolicyEntryUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description PolicyEntryUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
applyRetrospectively(AbstractRuntimeConfigurationBroker runtimeBroker, PolicyEntry updatedEntry)
Utility to properly apply an updated policy entry to all existing destinations that match this entry.static void
applyRetrospectively(AbstractRuntimeConfigurationBroker runtimeBroker, PolicyEntry updatedEntry, Set<String> includedProperties)
Utility to properly apply an updated policy entry to all existing destinations that match this entry.static PolicyEntry
findEntryByDestination(AbstractRuntimeConfigurationBroker runtimeBroker, PolicyEntry entry)
Find a matching PolicyEntry by looking up the Set of entries from the map and then comparing the destination to find the exact match.
-
-
-
Method Detail
-
findEntryByDestination
public static PolicyEntry findEntryByDestination(AbstractRuntimeConfigurationBroker runtimeBroker, PolicyEntry entry)
Find a matching PolicyEntry by looking up the Set of entries from the map and then comparing the destination to find the exact match. This lets us be able to find the correct policy entry to update even though there might be multiple that are returned from the get method of the PolicyMap.- Parameters:
runtimeBroker
-entry
-- Returns:
-
applyRetrospectively
public static void applyRetrospectively(AbstractRuntimeConfigurationBroker runtimeBroker, PolicyEntry updatedEntry)
Utility to properly apply an updated policy entry to all existing destinations that match this entry. The destination will only be updated if the policy is the exact policy (most specific) that matches the destination.- Parameters:
runtimeBroker
-updatedEntry
-
-
applyRetrospectively
public static void applyRetrospectively(AbstractRuntimeConfigurationBroker runtimeBroker, PolicyEntry updatedEntry, Set<String> includedProperties)
Utility to properly apply an updated policy entry to all existing destinations that match this entry. The destination will only be updated if the policy is the exact policy (most specific) that matches the destination. The includedProperties List is optional and is used to specify a list of properties to apply retrospectively to the matching destinations. This allows only certain properties to be reapplied. If the list is null then all properties will be applied.- Parameters:
runtimeBroker
-updatedEntry
-includedProperties
-
-
-