org.apache.qpid.server.exchange
Class DefaultExchangeRegistry

java.lang.Object
  extended by org.apache.qpid.server.exchange.DefaultExchangeRegistry
All Implemented Interfaces:
ExchangeRegistry, MessageRouter

public class DefaultExchangeRegistry
extends Object
implements ExchangeRegistry


Constructor Summary
DefaultExchangeRegistry(VirtualHost host)
           
 
Method Summary
 Exchange getDefaultExchange()
           
 DurableConfigurationStore getDurableConfigurationStore()
           
 Exchange getExchange(org.apache.qpid.framing.AMQShortString name)
           
 Exchange getExchange(String name)
           
 Collection<org.apache.qpid.framing.AMQShortString> getExchangeNames()
           
 void initialise()
           
 void registerExchange(Exchange exchange)
           
 void routeContent(IncomingMessage payload)
          Routes content through exchanges, delivering it to 1 or more queues.
 void setDefaultExchange(Exchange exchange)
           
 void unregisterExchange(org.apache.qpid.framing.AMQShortString name, boolean inUse)
          Unregister an exchange
 void unregisterExchange(String name, boolean inUse)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultExchangeRegistry

public DefaultExchangeRegistry(VirtualHost host)
Method Detail

initialise

public void initialise()
                throws org.apache.qpid.AMQException
Specified by:
initialise in interface ExchangeRegistry
Throws:
org.apache.qpid.AMQException

getDurableConfigurationStore

public DurableConfigurationStore getDurableConfigurationStore()

registerExchange

public void registerExchange(Exchange exchange)
                      throws org.apache.qpid.AMQException
Specified by:
registerExchange in interface ExchangeRegistry
Throws:
org.apache.qpid.AMQException

setDefaultExchange

public void setDefaultExchange(Exchange exchange)
Specified by:
setDefaultExchange in interface ExchangeRegistry

getDefaultExchange

public Exchange getDefaultExchange()
Specified by:
getDefaultExchange in interface ExchangeRegistry

getExchangeNames

public Collection<org.apache.qpid.framing.AMQShortString> getExchangeNames()
Specified by:
getExchangeNames in interface ExchangeRegistry

unregisterExchange

public void unregisterExchange(org.apache.qpid.framing.AMQShortString name,
                               boolean inUse)
                        throws org.apache.qpid.AMQException
Description copied from interface: ExchangeRegistry
Unregister an exchange

Specified by:
unregisterExchange in interface ExchangeRegistry
Parameters:
name - name of the exchange to delete
inUse - if true, do NOT delete the exchange if it is in use (has queues bound to it)
Throws:
ExchangeInUseException - when the exchange cannot be deleted because it is in use
org.apache.qpid.AMQException

unregisterExchange

public void unregisterExchange(String name,
                               boolean inUse)
                        throws org.apache.qpid.AMQException
Specified by:
unregisterExchange in interface ExchangeRegistry
Throws:
org.apache.qpid.AMQException

getExchange

public Exchange getExchange(org.apache.qpid.framing.AMQShortString name)
Specified by:
getExchange in interface ExchangeRegistry

getExchange

public Exchange getExchange(String name)
Specified by:
getExchange in interface ExchangeRegistry

routeContent

public void routeContent(IncomingMessage payload)
                  throws org.apache.qpid.AMQException
Routes content through exchanges, delivering it to 1 or more queues.

Specified by:
routeContent in interface MessageRouter
Parameters:
payload -
Throws:
org.apache.qpid.AMQException - if something goes wrong delivering data


Licensed to the Apache Software Foundation