org.apache.activemq.broker.util
Class TimeStampingBrokerPlugin

java.lang.Object
  extended by org.apache.activemq.broker.MutableBrokerFilter
      extended by org.apache.activemq.broker.BrokerPluginSupport
          extended by org.apache.activemq.broker.util.TimeStampingBrokerPlugin
All Implemented Interfaces:
Broker, BrokerPlugin, Region, Service

public class TimeStampingBrokerPlugin
extends BrokerPluginSupport

A Broker interceptor which updates a JMS Client's timestamp on the message with a broker timestamp. Useful when the clocks on client machines are known to not be correct and you can only trust the time set on the broker machines. Enabling this plugin will break JMS compliance since the timestamp that the producer sees on the messages after as send() will be different from the timestamp the consumer will observe when he receives the message. This plugin is not enabled in the default ActiveMQ configuration.

Version:
$Revision$

Constructor Summary
TimeStampingBrokerPlugin()
           
 
Method Summary
 void send(ConnectionContext context, Message message)
          Send a message to the broker to using the specified destination.
 
Methods inherited from class org.apache.activemq.broker.BrokerPluginSupport
installPlugin
 
Methods inherited from class org.apache.activemq.broker.MutableBrokerFilter
acknowledge, addBroker, addConnection, addConsumer, addDestination, addDestinationInfo, addProducer, addSession, beginTransaction, commitTransaction, forgetTransaction, gc, getAdaptor, getAdminConnectionContext, getBrokerId, getBrokerName, getClients, getDestinationMap, getDestinations, getDestinations, getDurableDestinations, getNext, getPeerBrokerInfos, getPendingDurableSubscriberPolicy, getPreparedTransactions, getTempDataStore, isFaultTolerantConfiguration, isSlaveBroker, isStopped, messagePull, prepareTransaction, processDispatch, processDispatchNotification, removeBroker, removeConnection, removeConsumer, removeDestination, removeDestinationInfo, removeProducer, removeSession, removeSubscription, rollbackTransaction, setAdminConnectionContext, setNext, setPendingDurableSubscriberPolicy, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimeStampingBrokerPlugin

public TimeStampingBrokerPlugin()
Method Detail

send

public void send(ConnectionContext context,
                 Message message)
          throws java.lang.Exception
Description copied from interface: Region
Send a message to the broker to using the specified destination. The destination specified in the message does not need to match the destination the message is sent to. This is handy in case the message is being sent to a dead letter destination.

Specified by:
send in interface Region
Overrides:
send in class MutableBrokerFilter
Parameters:
context - the environment the operation is being executed under.
Throws:
java.lang.Exception - TODO


Copyright © 2009 Apache Software Foundation. All Rights Reserved.