Package org.apache.activemq.plugin
Class ForcePersistencyModeBrokerPlugin
- java.lang.Object
-
- org.apache.activemq.plugin.ForcePersistencyModeBrokerPlugin
-
- All Implemented Interfaces:
BrokerPlugin
public class ForcePersistencyModeBrokerPlugin extends Object implements 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 Constructor Description ForcePersistencyModeBrokerPlugin()
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Broker
installPlugin(Broker broker)
Installs the plugin into the interceptor chain of the broker, returning the new intercepted broker to use.boolean
isPersistenceForced()
void
setPersistenceFlag(boolean persistenceFlag)
Sets the persistence mode.
-
-
-
Method Detail
-
installPlugin
public Broker installPlugin(Broker broker) throws Exception
Description copied from interface:BrokerPlugin
Installs the plugin into the interceptor chain of the broker, returning the new intercepted broker to use.- Specified by:
installPlugin
in interfaceBrokerPlugin
- Parameters:
broker
-- Returns:
- the Broker
- Throws:
Exception
- See Also:
BrokerPlugin.installPlugin(org.apache.activemq.broker.Broker)
-
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
-
-