org.apache.qpid.extras.exchanges.diagnostic
Class DiagnosticExchange

java.lang.Object
  extended by org.apache.qpid.server.exchange.AbstractExchange
      extended by org.apache.qpid.extras.exchanges.diagnostic.DiagnosticExchange
All Implemented Interfaces:
org.apache.qpid.server.configuration.ConfiguredObject<org.apache.qpid.server.configuration.ExchangeConfigType,org.apache.qpid.server.configuration.ExchangeConfig>, org.apache.qpid.server.configuration.ExchangeConfig, org.apache.qpid.server.exchange.Exchange, org.apache.qpid.server.exchange.ExchangeReferrer, org.apache.qpid.server.management.Managable

public class DiagnosticExchange
extends org.apache.qpid.server.exchange.AbstractExchange

This is a special diagnostic exchange type which doesn't actually do anything with messages. When it receives a message, it writes information about the current memory usage to the "memory" property of the message and places it on the diagnosticqueue for retrieval


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.qpid.server.exchange.Exchange
org.apache.qpid.server.exchange.Exchange.BindingListener, org.apache.qpid.server.exchange.Exchange.Task
 
Field Summary
static org.apache.qpid.framing.AMQShortString DIAGNOSTIC_EXCHANGE_CLASS
           
static org.apache.qpid.framing.AMQShortString DIAGNOSTIC_EXCHANGE_NAME
           
static org.apache.qpid.server.exchange.ExchangeType<DiagnosticExchange> TYPE
           
 
Fields inherited from class org.apache.qpid.server.exchange.AbstractExchange
_autoDelete, _durable, _exchangeMbean, _ticket
 
Constructor Summary
DiagnosticExchange()
           
 
Method Summary
protected  org.apache.qpid.server.exchange.AbstractExchangeMBean createMBean()
          Creates a new MBean instance
 ArrayList<org.apache.qpid.server.queue.AMQQueue> doRoute(org.apache.qpid.server.message.InboundMessage payload)
           
 org.apache.log4j.Logger getLogger()
           
 boolean hasBindings()
           
 boolean isBound(org.apache.qpid.server.queue.AMQQueue queue)
           
 boolean isBound(org.apache.qpid.framing.AMQShortString routingKey)
           
 boolean isBound(org.apache.qpid.framing.AMQShortString routingKey, org.apache.qpid.server.queue.AMQQueue queue)
           
 boolean isBound(org.apache.qpid.framing.AMQShortString routingKey, org.apache.qpid.framing.FieldTable arguments, org.apache.qpid.server.queue.AMQQueue queue)
           
protected  void onBind(org.apache.qpid.server.binding.Binding binding)
           
protected  void onUnbind(org.apache.qpid.server.binding.Binding binding)
           
 void registerQueue(String routingKey, org.apache.qpid.server.queue.AMQQueue queue, Map<String,Object> args)
           
 
Methods inherited from class org.apache.qpid.server.exchange.AbstractExchange
addBinding, addBindingListener, addCloseTask, addReference, close, getAlternateExchange, getArguments, getBindingCount, getBindingCountHigh, getBindings, getByteReceives, getByteRoutes, getConfigStore, getConfigType, getCreateTime, getId, getManagedObject, getMsgReceives, getMsgRoutes, getName, getNameShortString, getParent, getQueueRegistry, getTicket, getType, getTypeShortString, getVirtualHost, hasReferrers, initialise, isAutoDelete, isBound, isBound, isBound, isDurable, removeBinding, removeBindingListener, removeCloseTask, removeReference, route, setAlternateExchange, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DIAGNOSTIC_EXCHANGE_CLASS

public static final org.apache.qpid.framing.AMQShortString DIAGNOSTIC_EXCHANGE_CLASS

DIAGNOSTIC_EXCHANGE_NAME

public static final org.apache.qpid.framing.AMQShortString DIAGNOSTIC_EXCHANGE_NAME

TYPE

public static final org.apache.qpid.server.exchange.ExchangeType<DiagnosticExchange> TYPE
Constructor Detail

DiagnosticExchange

public DiagnosticExchange()
Method Detail

createMBean

protected org.apache.qpid.server.exchange.AbstractExchangeMBean createMBean()
                                                                     throws JMException
Creates a new MBean instance

Specified by:
createMBean in class org.apache.qpid.server.exchange.AbstractExchange
Returns:
the newly created MBean
Throws:
org.apache.qpid.AMQException - if something goes wrong
JMException

getLogger

public org.apache.log4j.Logger getLogger()
Specified by:
getLogger in class org.apache.qpid.server.exchange.AbstractExchange

registerQueue

public void registerQueue(String routingKey,
                          org.apache.qpid.server.queue.AMQQueue queue,
                          Map<String,Object> args)
                   throws org.apache.qpid.AMQException
Throws:
org.apache.qpid.AMQException

isBound

public boolean isBound(org.apache.qpid.framing.AMQShortString routingKey,
                       org.apache.qpid.server.queue.AMQQueue queue)

isBound

public boolean isBound(org.apache.qpid.framing.AMQShortString routingKey)

isBound

public boolean isBound(org.apache.qpid.server.queue.AMQQueue queue)

hasBindings

public boolean hasBindings()

doRoute

public ArrayList<org.apache.qpid.server.queue.AMQQueue> doRoute(org.apache.qpid.server.message.InboundMessage payload)
Specified by:
doRoute in class org.apache.qpid.server.exchange.AbstractExchange

isBound

public boolean isBound(org.apache.qpid.framing.AMQShortString routingKey,
                       org.apache.qpid.framing.FieldTable arguments,
                       org.apache.qpid.server.queue.AMQQueue queue)

onBind

protected void onBind(org.apache.qpid.server.binding.Binding binding)
Specified by:
onBind in class org.apache.qpid.server.exchange.AbstractExchange

onUnbind

protected void onUnbind(org.apache.qpid.server.binding.Binding binding)
Specified by:
onUnbind in class org.apache.qpid.server.exchange.AbstractExchange


Licensed to the Apache Software Foundation