Package org.ow2.joram.mom.amqp
Class FanoutExchange
- java.lang.Object
-
- org.ow2.joram.mom.amqp.IExchange
-
- org.ow2.joram.mom.amqp.FanoutExchange
-
- All Implemented Interfaces:
Externalizable,Serializable,IExchangeMBean
public class FanoutExchange extends IExchange
The fanout exchange type works as follows:- 1. A message queue binds to the exchange with no arguments.
- 2. A publisher sends the exchange a message.
- 3. The message is passed to the message queue unconditionally.
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private Set<String>boundQueuesstatic StringDEFAULT_NAMEprivate static longserialVersionUIDdefine serialVersionUID for interoperabilitystatic StringTYPE-
Fields inherited from class org.ow2.joram.mom.amqp.IExchange
DEFAULT_EXCHANGE_NAME, durable, logger, name, PREFIX_EXCHANGE
-
-
Constructor Summary
Constructors Constructor Description FanoutExchange()FanoutExchange(String name, boolean durable)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbind(String queueName, String routingKey, Map<String,Object> arguments)voiddoPublish(String routingKey, boolean mandatory, boolean immediate, AMQP.Basic.BasicProperties properties, byte[] body, int channelNumber, short serverId, long proxyId)Set<String>getBoundQueues()StringgetType()booleanisUnused()voidreadExternal(ObjectInput in)voidremoveQueueBindings(String queueName)voidsetArguments(Map<String,Object> arguments)voidunbind(String queueName, String routingKey, Map<String,Object> arguments)voidwriteExternal(ObjectOutput out)-
Methods inherited from class org.ow2.joram.mom.amqp.IExchange
checkPublication, createExchange, deleteExchange, getHandledMessageCount, getName, getPublishedMessageCount, isDurable, loadExchange, publish, publishToQueue, saveExchange
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
define serialVersionUID for interoperability- See Also:
- Constant Field Values
-
DEFAULT_NAME
public static final String DEFAULT_NAME
- See Also:
- Constant Field Values
-
TYPE
public static final String TYPE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
FanoutExchange
public FanoutExchange()
-
FanoutExchange
public FanoutExchange(String name, boolean durable)
-
-
Method Detail
-
unbind
public void unbind(String queueName, String routingKey, Map<String,Object> arguments) throws NotFoundException
- Specified by:
unbindin classIExchange- Throws:
NotFoundException
-
doPublish
public void doPublish(String routingKey, boolean mandatory, boolean immediate, AMQP.Basic.BasicProperties properties, byte[] body, int channelNumber, short serverId, long proxyId) throws NoConsumersException, NotFoundException, TransactionException
- Specified by:
doPublishin classIExchange- Throws:
NoConsumersExceptionNotFoundExceptionTransactionException
-
setArguments
public void setArguments(Map<String,Object> arguments)
- Specified by:
setArgumentsin classIExchange
-
getType
public String getType()
-
removeQueueBindings
public void removeQueueBindings(String queueName)
- Specified by:
removeQueueBindingsin classIExchange
-
getBoundQueues
public Set<String> getBoundQueues()
- Specified by:
getBoundQueuesin interfaceIExchangeMBean- Specified by:
getBoundQueuesin classIExchange
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternalin interfaceExternalizable- Overrides:
writeExternalin classIExchange- Parameters:
out-- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternalin interfaceExternalizable- Overrides:
readExternalin classIExchange- Parameters:
in-- Throws:
IOExceptionClassNotFoundException
-
-