org.apache.qpid.server.exchange
Interface Exchange

All Superinterfaces:
ConfiguredObject<ExchangeConfigType,ExchangeConfig>, ExchangeConfig, ExchangeReferrer
All Known Implementing Classes:
AbstractExchange, DirectExchange, FanoutExchange, HeadersExchange, ManagementExchange, TopicExchange

public interface Exchange
extends ExchangeReferrer, ExchangeConfig


Nested Class Summary
static interface Exchange.BindingListener
           
static interface Exchange.Task
           
 
Method Summary
 void addBinding(Binding binding)
           
 void addBindingListener(Exchange.BindingListener listener)
           
 void addCloseTask(Exchange.Task task)
           
 void addReference(ExchangeReferrer exchange)
           
 void close()
           
 Exchange getAlternateExchange()
           
 Collection<Binding> getBindings()
           
 org.apache.qpid.framing.AMQShortString getNameShortString()
           
 int getTicket()
           
 org.apache.qpid.framing.AMQShortString getTypeShortString()
           
 boolean hasBindings()
          Returns true if this exchange has at least one binding associated with it.
 boolean hasReferrers()
           
 void initialise(VirtualHost host, org.apache.qpid.framing.AMQShortString name, boolean durable, int ticket, boolean autoDelete)
           
 boolean isAutoDelete()
           
 boolean isBound(AMQQueue queue)
           
 boolean isBound(org.apache.qpid.framing.AMQShortString routingKey)
          Determines whether a message is routing to any queue using a specific _routing key
 boolean isBound(org.apache.qpid.framing.AMQShortString routingKey, AMQQueue queue)
          Determines whether a message would be isBound to a particular queue using a specific routing key
 boolean isBound(org.apache.qpid.framing.AMQShortString routingKey, org.apache.qpid.framing.FieldTable arguments, AMQQueue queue)
          Determines whether a message would be isBound to a particular queue using a specific routing key and arguments
 boolean isBound(String bindingKey)
           
 boolean isBound(String bindingKey, AMQQueue queue)
           
 boolean isDurable()
           
 void removeBinding(Binding binding)
           
 void removeBindingListener(Exchange.BindingListener listener)
           
 void removeCloseTask(Exchange.Task task)
           
 void removeReference(ExchangeReferrer exchange)
           
 ArrayList<? extends BaseQueue> route(InboundMessage message)
           
 void setAlternateExchange(Exchange exchange)
           
 
Methods inherited from interface org.apache.qpid.server.configuration.ExchangeConfig
getArguments, getBindingCount, getBindingCountHigh, getByteReceives, getByteRoutes, getMsgReceives, getMsgRoutes, getName, getType, getVirtualHost
 
Methods inherited from interface org.apache.qpid.server.configuration.ConfiguredObject
getConfigType, getCreateTime, getId, getParent
 

Method Detail

getNameShortString

org.apache.qpid.framing.AMQShortString getNameShortString()

getTypeShortString

org.apache.qpid.framing.AMQShortString getTypeShortString()

initialise

void initialise(VirtualHost host,
                org.apache.qpid.framing.AMQShortString name,
                boolean durable,
                int ticket,
                boolean autoDelete)
                throws org.apache.qpid.AMQException,
                       JMException
Throws:
org.apache.qpid.AMQException
JMException

isDurable

boolean isDurable()
Specified by:
isDurable in interface ConfiguredObject<ExchangeConfigType,ExchangeConfig>

isAutoDelete

boolean isAutoDelete()
Specified by:
isAutoDelete in interface ExchangeConfig
Returns:
true if the exchange will be deleted after all queues have been detached

getTicket

int getTicket()

close

void close()
           throws org.apache.qpid.AMQException
Throws:
org.apache.qpid.AMQException

route

ArrayList<? extends BaseQueue> route(InboundMessage message)

isBound

boolean isBound(org.apache.qpid.framing.AMQShortString routingKey,
                org.apache.qpid.framing.FieldTable arguments,
                AMQQueue queue)
Determines whether a message would be isBound to a particular queue using a specific routing key and arguments

Parameters:
routingKey -
arguments -
queue -
Returns:
Throws:
org.apache.qpid.AMQException

isBound

boolean isBound(org.apache.qpid.framing.AMQShortString routingKey,
                AMQQueue queue)
Determines whether a message would be isBound to a particular queue using a specific routing key

Parameters:
routingKey -
queue -
Returns:
Throws:
org.apache.qpid.AMQException

isBound

boolean isBound(org.apache.qpid.framing.AMQShortString routingKey)
Determines whether a message is routing to any queue using a specific _routing key

Parameters:
routingKey -
Returns:
Throws:
org.apache.qpid.AMQException

isBound

boolean isBound(AMQQueue queue)

hasBindings

boolean hasBindings()
Returns true if this exchange has at least one binding associated with it.

Returns:
Throws:
org.apache.qpid.AMQException

isBound

boolean isBound(String bindingKey,
                AMQQueue queue)

isBound

boolean isBound(String bindingKey)

addCloseTask

void addCloseTask(Exchange.Task task)

removeCloseTask

void removeCloseTask(Exchange.Task task)

getAlternateExchange

Exchange getAlternateExchange()
Specified by:
getAlternateExchange in interface ExchangeConfig

setAlternateExchange

void setAlternateExchange(Exchange exchange)

removeReference

void removeReference(ExchangeReferrer exchange)

addReference

void addReference(ExchangeReferrer exchange)

hasReferrers

boolean hasReferrers()

addBinding

void addBinding(Binding binding)

removeBinding

void removeBinding(Binding binding)

getBindings

Collection<Binding> getBindings()

addBindingListener

void addBindingListener(Exchange.BindingListener listener)

removeBindingListener

void removeBindingListener(Exchange.BindingListener listener)


Licensed to the Apache Software Foundation