org.apache.activemq.plugin
Class ForcePersistencyModeBroker

java.lang.Object
  extended by org.apache.activemq.broker.BrokerFilter
      extended by org.apache.activemq.plugin.ForcePersistencyModeBroker
All Implemented Interfaces:
Broker, Region, Service

public class ForcePersistencyModeBroker
extends BrokerFilter

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.


Field Summary
static Logger log
           
 
Fields inherited from class org.apache.activemq.broker.BrokerFilter
next
 
Constructor Summary
ForcePersistencyModeBroker(Broker next)
          Constructor
 
Method Summary
 boolean isPersistent()
           
 void send(ProducerBrokerExchange producerExchange, Message messageSend)
          Sets the persistence mode
 void setPersistenceFlag(boolean mode)
           
 
Methods inherited from class org.apache.activemq.broker.BrokerFilter
acknowledge, addBroker, addConnection, addConsumer, addDestination, addDestinationInfo, addProducer, addSession, beginTransaction, brokerServiceStarted, commitTransaction, fastProducer, forgetTransaction, gc, getAdaptor, getAdminConnectionContext, getBrokerId, getBrokerName, getBrokerSequenceId, getBrokerService, getClients, getDestinationMap, getDestinations, getDestinations, getDurableDestinations, getExecutor, getPeerBrokerInfos, getPreparedTransactions, getRoot, getScheduler, getTempDataStore, getVmConnectorURI, isExpired, isFaultTolerantConfiguration, isFull, isStopped, messageConsumed, messageDelivered, messageDiscarded, messageExpired, messagePull, networkBridgeStarted, networkBridgeStopped, nowMasterBroker, postProcessDispatch, prepareTransaction, preProcessDispatch, processConsumerControl, processDispatchNotification, removeBroker, removeConnection, removeConsumer, removeDestination, removeDestinationInfo, removeProducer, removeSession, removeSubscription, rollbackTransaction, sendToDeadLetterQueue, setAdminConnectionContext, slowConsumer, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

public static Logger log
Constructor Detail

ForcePersistencyModeBroker

public ForcePersistencyModeBroker(Broker next)
Constructor

Parameters:
next -
Method Detail

isPersistent

public boolean isPersistent()
Returns:
the persistenceFlag

setPersistenceFlag

public void setPersistenceFlag(boolean mode)
Parameters:
persistenceFlag - the persistenceFlag to set

send

public void send(ProducerBrokerExchange producerExchange,
                 Message messageSend)
          throws Exception
Sets the persistence mode

Specified by:
send in interface Region
Overrides:
send in class BrokerFilter
Parameters:
producerExchange - the environment the operation is being executed under.
Throws:
Exception - TODO
See Also:
BrokerFilter.send(org.apache.activemq.broker.ProducerBrokerExchange, org.apache.activemq.command.Message)


Copyright © 2005-2012 The Apache Software Foundation. All Rights Reserved.