Package org.apache.activemq.plugin
Class ForcePersistencyModeBrokerPlugin
java.lang.Object
org.apache.activemq.plugin.ForcePersistencyModeBrokerPlugin
- All Implemented Interfaces:
BrokerPlugin
A Plugin which allows to force every incoming message to be PERSISTENT or
NON-PERSISTENT.
Useful, if you have set the broker usage policy to process ONLY persistent or
ONLY non-persistent messages.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioninstallPlugin(Broker broker) Installs the plugin into the interceptor chain of the broker, returning the new intercepted broker to use.final booleanvoidsetPersistenceFlag(boolean persistenceFlag) Sets the persistence mode.
-
Constructor Details
-
ForcePersistencyModeBrokerPlugin
public ForcePersistencyModeBrokerPlugin()Constructor
-
-
Method Details
-
installPlugin
Description copied from interface:BrokerPluginInstalls the plugin into the interceptor chain of the broker, returning the new intercepted broker to use.- Specified by:
installPluginin interfaceBrokerPlugin- Parameters:
broker-- Returns:
- the Broker
- Throws:
Exception- See Also:
-
setPersistenceFlag
public void setPersistenceFlag(boolean persistenceFlag) Sets the persistence mode.- Parameters:
persistenceFlag-
-
isPersistenceForced
public final boolean isPersistenceForced()- Returns:
- the mode the (activated) plugin will set the message delivery mode
-