Package org.ow2.joram.mom.amqp
Class IExchange
- java.lang.Object
-
- org.ow2.joram.mom.amqp.IExchange
-
- All Implemented Interfaces:
Externalizable,Serializable,IExchangeMBean
- Direct Known Subclasses:
DirectExchange,FanoutExchange,HeadersExchange,TopicExchange
public abstract class IExchange extends Object implements IExchangeMBean, Externalizable
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_EXCHANGE_NAMEprotected booleandurableprivate longhandledMessageCountstatic Loggerloggerprotected Stringnamestatic StringPREFIX_EXCHANGEprivate booleanpublishedprivate longpublishedMessageCountprivate StringsaveNameprivate static longserialVersionUIDdefine serialVersionUID for interoperability
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidbind(String queueName, String routingKey, Map<String,Object> arguments)protected voidcheckPublication(boolean mandatory)protected voidcreateExchange()protected voiddeleteExchange()abstract voiddoPublish(String routingKey, boolean mandatory, boolean immediate, AMQP.Basic.BasicProperties properties, byte[] body, int channelNumber, short serverId, long proxyId)abstract Set<String>getBoundQueues()longgetHandledMessageCount()StringgetName()longgetPublishedMessageCount()booleanisDurable()abstract booleanisUnused()static IExchangeloadExchange(String name)voidpublish(String routingKey, boolean mandatory, boolean immediate, AMQP.Basic.BasicProperties properties, byte[] body, int channelNumber, short serverId, long proxyId)protected voidpublishToQueue(String queueName, String routingKey, boolean immediate, AMQP.Basic.BasicProperties properties, byte[] body, int channelNumber, short serverId, long proxyId)voidreadExternal(ObjectInput in)abstract voidremoveQueueBindings(String queueName)protected voidsaveExchange()abstract voidsetArguments(Map<String,Object> arguments)abstract voidunbind(String queueName, String routingKey, Map<String,Object> arguments)voidwriteExternal(ObjectOutput out)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.ow2.joram.mom.amqp.IExchangeMBean
getType
-
-
-
-
Field Detail
-
logger
public static final Logger logger
-
serialVersionUID
private static final long serialVersionUID
define serialVersionUID for interoperability- See Also:
- Constant Field Values
-
DEFAULT_EXCHANGE_NAME
public static final String DEFAULT_EXCHANGE_NAME
- See Also:
- Constant Field Values
-
PREFIX_EXCHANGE
public static final String PREFIX_EXCHANGE
- See Also:
- Constant Field Values
-
saveName
private String saveName
-
name
protected String name
-
durable
protected boolean durable
-
handledMessageCount
private long handledMessageCount
-
publishedMessageCount
private long publishedMessageCount
-
published
private boolean published
-
-
Constructor Detail
-
IExchange
public IExchange()
-
IExchange
public IExchange(String name, boolean durable)
-
-
Method Detail
-
publishToQueue
protected void publishToQueue(String queueName, String routingKey, boolean immediate, AMQP.Basic.BasicProperties properties, byte[] body, int channelNumber, short serverId, long proxyId) throws NoConsumersException, TransactionException
-
checkPublication
protected void checkPublication(boolean mandatory) throws NotFoundException- Throws:
NotFoundException
-
publish
public final void publish(String routingKey, boolean mandatory, boolean immediate, AMQP.Basic.BasicProperties properties, byte[] body, int channelNumber, short serverId, long proxyId) throws NoConsumersException, NotFoundException, TransactionException
-
doPublish
public abstract void doPublish(String routingKey, boolean mandatory, boolean immediate, AMQP.Basic.BasicProperties properties, byte[] body, int channelNumber, short serverId, long proxyId) throws NoConsumersException, NotFoundException, TransactionException
-
unbind
public abstract void unbind(String queueName, String routingKey, Map<String,Object> arguments) throws NotFoundException
- Throws:
NotFoundException
-
isUnused
public abstract boolean isUnused()
-
removeQueueBindings
public abstract void removeQueueBindings(String queueName) throws TransactionException
- Throws:
TransactionException
-
getBoundQueues
public abstract Set<String> getBoundQueues()
- Specified by:
getBoundQueuesin interfaceIExchangeMBean
-
getName
public String getName()
- Specified by:
getNamein interfaceIExchangeMBean
-
getHandledMessageCount
public long getHandledMessageCount()
- Specified by:
getHandledMessageCountin interfaceIExchangeMBean
-
getPublishedMessageCount
public long getPublishedMessageCount()
- Specified by:
getPublishedMessageCountin interfaceIExchangeMBean
-
isDurable
public boolean isDurable()
- Specified by:
isDurablein interfaceIExchangeMBean
-
loadExchange
public static IExchange loadExchange(String name) throws IOException, ClassNotFoundException, TransactionException
-
createExchange
protected final void createExchange()
-
saveExchange
protected final void saveExchange()
-
deleteExchange
protected final void deleteExchange() throws AccessRefusedException- Throws:
AccessRefusedException
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternalin interfaceExternalizable- Parameters:
out-- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternalin interfaceExternalizable- Parameters:
in-- Throws:
IOExceptionClassNotFoundException
-
-