public abstract class IExchange extends Object implements IExchangeMBean, Externalizable
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_EXCHANGE_NAME |
protected boolean |
durable |
private long |
handledMessageCount |
static org.objectweb.util.monolog.api.Logger |
logger |
protected String |
name |
static String |
PREFIX_EXCHANGE |
private boolean |
published |
private long |
publishedMessageCount |
private String |
saveName |
private static long |
serialVersionUID
define serialVersionUID for interoperability
|
Constructor and Description |
---|
IExchange() |
IExchange(String name,
boolean durable) |
Modifier and Type | Method and Description |
---|---|
abstract void |
bind(String queueName,
String routingKey,
Map<String,Object> arguments) |
protected void |
checkPublication(boolean mandatory) |
protected void |
createExchange() |
protected void |
deleteExchange() |
abstract void |
doPublish(String routingKey,
boolean mandatory,
boolean immediate,
AMQP.Basic.BasicProperties properties,
byte[] body,
int channelNumber,
short serverId,
long proxyId) |
abstract Set<String> |
getBoundQueues() |
long |
getHandledMessageCount() |
String |
getName() |
long |
getPublishedMessageCount() |
boolean |
isDurable() |
abstract boolean |
isUnused() |
static IExchange |
loadExchange(String name) |
void |
publish(String routingKey,
boolean mandatory,
boolean immediate,
AMQP.Basic.BasicProperties properties,
byte[] body,
int channelNumber,
short serverId,
long proxyId) |
protected void |
publishToQueue(String queueName,
String routingKey,
boolean immediate,
AMQP.Basic.BasicProperties properties,
byte[] body,
int channelNumber,
short serverId,
long proxyId) |
void |
readExternal(ObjectInput in) |
abstract void |
removeQueueBindings(String queueName) |
protected void |
saveExchange() |
abstract void |
setArguments(Map<String,Object> arguments) |
abstract void |
unbind(String queueName,
String routingKey,
Map<String,Object> arguments) |
void |
writeExternal(ObjectOutput out) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getType
private static final long serialVersionUID
public static final org.objectweb.util.monolog.api.Logger logger
public static final String DEFAULT_EXCHANGE_NAME
public static final String PREFIX_EXCHANGE
private String saveName
protected String name
protected boolean durable
private long handledMessageCount
private long publishedMessageCount
private boolean published
public IExchange()
public IExchange(String name, boolean durable)
protected void publishToQueue(String queueName, String routingKey, boolean immediate, AMQP.Basic.BasicProperties properties, byte[] body, int channelNumber, short serverId, long proxyId) throws NoConsumersException, TransactionException
protected void checkPublication(boolean mandatory) throws NotFoundException
NotFoundException
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
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
public abstract void unbind(String queueName, String routingKey, Map<String,Object> arguments) throws NotFoundException
NotFoundException
public abstract boolean isUnused()
public abstract void removeQueueBindings(String queueName) throws TransactionException
TransactionException
public abstract Set<String> getBoundQueues()
getBoundQueues
in interface IExchangeMBean
public String getName()
getName
in interface IExchangeMBean
public long getHandledMessageCount()
getHandledMessageCount
in interface IExchangeMBean
public long getPublishedMessageCount()
getPublishedMessageCount
in interface IExchangeMBean
public boolean isDurable()
isDurable
in interface IExchangeMBean
public static IExchange loadExchange(String name) throws IOException, ClassNotFoundException, TransactionException
protected final void createExchange()
protected final void saveExchange()
protected final void deleteExchange() throws AccessRefusedException
AccessRefusedException
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
out
- IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
in
- IOException
ClassNotFoundException
Copyright © 2016 ScalAgent D.T.. All Rights Reserved.