org.apache.activemq.broker.util
Class LoggingBrokerPlugin

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

public class LoggingBrokerPlugin
extends BrokerPluginSupport

A simple Broker interceptor which allows you to enable/disable logging.

Version:
$Revision: 427613 $

Constructor Summary
LoggingBrokerPlugin()
           
 
Method Summary
 void acknowledge(ConnectionContext context, MessageAck ack)
          Used to acknowledge the receipt of a message by a client.
 org.apache.commons.logging.Log getAckLog()
           
 org.apache.commons.logging.Log getLog()
           
 org.apache.commons.logging.Log getSendLog()
           
 void send(ConnectionContext context, Message messageSend)
          Send a message to the broker to using the specified destination.
 void setAckLog(org.apache.commons.logging.Log ackLog)
           
 void setLog(org.apache.commons.logging.Log log)
           
 void setSendLog(org.apache.commons.logging.Log sendLog)
           
 
Methods inherited from class org.apache.activemq.broker.BrokerPluginSupport
installPlugin
 
Methods inherited from class org.apache.activemq.broker.MutableBrokerFilter
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

LoggingBrokerPlugin

public LoggingBrokerPlugin()
Method Detail

send

public void send(ConnectionContext context,
                 Message messageSend)
          throws 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:
Exception - TODO

acknowledge

public void acknowledge(ConnectionContext context,
                        MessageAck ack)
                 throws Exception
Description copied from interface: Region
Used to acknowledge the receipt of a message by a client.

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

getAckLog

public org.apache.commons.logging.Log getAckLog()

setAckLog

public void setAckLog(org.apache.commons.logging.Log ackLog)

getLog

public org.apache.commons.logging.Log getLog()

setLog

public void setLog(org.apache.commons.logging.Log log)

getSendLog

public org.apache.commons.logging.Log getSendLog()

setSendLog

public void setSendLog(org.apache.commons.logging.Log sendLog)


Copyright © 2011 Apache Software Foundation. All Rights Reserved.