public class Proxy extends Object implements DeliveryListener, ProxyMBean
AMQPConnectionListener
.Modifier and Type | Class and Description |
---|---|
(package private) class |
Proxy.NetServerIn |
Modifier and Type | Field and Description |
---|---|
private Map<Integer,ChannelContext> |
channelContexts |
private Set<QueueShell> |
exclusiveQueues |
static org.objectweb.util.monolog.api.Logger |
logger |
private ProxyName |
name |
private Proxy.NetServerIn |
netServerIn |
static String |
PREFIX_PX |
private static long |
proxyId |
private Queue |
queueIn |
private Queue |
queueOut |
private Transaction |
transaction |
Modifier and Type | Method and Description |
---|---|
void |
basicAck(AMQP.Basic.Ack ack) |
void |
basicCancel(String consumerTag,
int channelNumber) |
void |
basicConsume(AMQP.Basic.Consume basicConsume) |
GetResponse |
basicGet(AMQP.Basic.Get basicGet) |
void |
basicPublish(PublishRequest publishRequest) |
void |
basicQoS(AMQP.Basic.Qos qos) |
void |
basicRecover(boolean requeue,
int channelNumber) |
void |
basicReject(AMQP.Basic.Reject basicReject) |
void |
channelClose(int channelNumber) |
void |
cleanConsumers(short sid) |
private void |
cleanQueueContext(int channelNumber,
QueueShell queueShell) |
private void |
commitTx() |
void |
connectionClose() |
boolean |
deliver(String consumerTag,
int channelNumber,
Queue queue,
short serverId,
long proxyId) |
private void |
doCancel(String consumerTag,
int channelNumber,
QueueShell queueShell) |
private int |
doGetDeliveries(String consumerTag,
int channelId,
int maxMessage,
Queue queue) |
protected void |
doProcessMethod(AbstractMarshallingMethod method) |
void |
exchangeDeclare(AMQP.Exchange.Declare exchangeDeclare) |
void |
exchangeDelete(AMQP.Exchange.Delete exchangeDelete) |
private ChannelContext |
getContext(int channelNumber) |
private void |
getDeliveries(GetDeliveries getDeliveries) |
Set<String> |
getExclusiveQueues() |
private static long |
getNextProxyId() |
Integer[] |
getOpenedChannels() |
int |
getQueueInSize() |
int |
getQueueOutSize() |
void |
loadProxyId() |
void |
queueBind(AMQP.Queue.Bind queueBind) |
AMQP.Queue.DeclareOk |
queueDeclare(AMQP.Queue.Declare queueDeclare) |
AMQP.Queue.DeleteOk |
queueDelete(AMQP.Queue.Delete queueDelete) |
AMQP.Queue.PurgeOk |
queuePurge(AMQP.Queue.Purge queuePurge) |
void |
queueUnbind(AMQP.Queue.Unbind queueUnbind) |
void |
saveProxyId() |
void |
send(AbstractMarshallingMethod method) |
void |
send(Deliver deliver,
QueueShell queue) |
void |
send(GetResponse response) |
void |
send(Returned response) |
void |
start() |
void |
stop() |
private void |
throwException(AMQPException amqe,
int channelNumber,
int classId,
int methodId)
Releases connection or channel resources and close it by sending a
notification to the client.
|
void |
txCommit(int channelNumber) |
void |
txRollback(int channelNumber) |
public static org.objectweb.util.monolog.api.Logger logger
public static final String PREFIX_PX
private static volatile long proxyId
private ProxyName name
private Queue queueIn
private Queue queueOut
private Proxy.NetServerIn netServerIn
private Transaction transaction
private Set<QueueShell> exclusiveQueues
private Map<Integer,ChannelContext> channelContexts
public Proxy(Queue queueIn, Queue queueOut) throws IOException
IOException
private static long getNextProxyId()
public void loadProxyId() throws IOException
IOException
public void saveProxyId() throws IOException
IOException
protected void doProcessMethod(AbstractMarshallingMethod method) throws AMQPException
method
- AMQPException
private void throwException(AMQPException amqe, int channelNumber, int classId, int methodId) throws AMQPException
AMQPException
private void commitTx() throws TransactionException
TransactionException
private ChannelContext getContext(int channelNumber)
public void cleanConsumers(short sid) throws AMQPException
AMQPException
public void basicAck(AMQP.Basic.Ack ack) throws PreconditionFailedException
PreconditionFailedException
public void basicCancel(String consumerTag, int channelNumber) throws AMQPException, ResourceLockedException
AMQPException
ResourceLockedException
private void doCancel(String consumerTag, int channelNumber, QueueShell queueShell) throws ResourceLockedException, NotFoundException, PreconditionFailedException, AMQPException
private void getDeliveries(GetDeliveries getDeliveries)
private int doGetDeliveries(String consumerTag, int channelId, int maxMessage, Queue queue)
public void basicConsume(AMQP.Basic.Consume basicConsume) throws NotFoundException, NotAllowedException, AMQPException, AccessRefusedException, ResourceLockedException
public GetResponse basicGet(AMQP.Basic.Get basicGet) throws NotFoundException, AMQPException, SyntaxErrorException, ResourceLockedException
public void basicPublish(PublishRequest publishRequest) throws NotFoundException, TransactionException
public void basicRecover(boolean requeue, int channelNumber) throws TransactionException
TransactionException
public void basicReject(AMQP.Basic.Reject basicReject) throws TransactionException, PreconditionFailedException
public void basicQoS(AMQP.Basic.Qos qos) throws NotImplementedException
NotImplementedException
public void channelClose(int channelNumber) throws AMQPException
AMQPException
public void connectionClose()
public void exchangeDeclare(AMQP.Exchange.Declare exchangeDeclare) throws CommandInvalidException, NotAllowedException, NotFoundException, AMQPException
public void exchangeDelete(AMQP.Exchange.Delete exchangeDelete) throws NotFoundException, PreconditionFailedException, AMQPException
public void queueBind(AMQP.Queue.Bind queueBind) throws NotFoundException, SyntaxErrorException, ResourceLockedException, AMQPException
public AMQP.Queue.DeclareOk queueDeclare(AMQP.Queue.Declare queueDeclare) throws NotFoundException, ResourceLockedException, AMQPException
public AMQP.Queue.DeleteOk queueDelete(AMQP.Queue.Delete queueDelete) throws NotFoundException, PreconditionFailedException, ResourceLockedException, AMQPException
private void cleanQueueContext(int channelNumber, QueueShell queueShell)
public AMQP.Queue.PurgeOk queuePurge(AMQP.Queue.Purge queuePurge) throws NotFoundException, NotAllowedException, ResourceLockedException, SyntaxErrorException, AMQPException
public void queueUnbind(AMQP.Queue.Unbind queueUnbind) throws NotFoundException, AMQPException
NotFoundException
AMQPException
public void txCommit(int channelNumber) throws PreconditionFailedException, TransactionException
public void txRollback(int channelNumber) throws PreconditionFailedException
PreconditionFailedException
public boolean deliver(String consumerTag, int channelNumber, Queue queue, short serverId, long proxyId)
deliver
in interface DeliveryListener
public void send(AbstractMarshallingMethod method)
public void send(GetResponse response)
public void send(Deliver deliver, QueueShell queue)
public void send(Returned response)
public void stop()
public void start()
public int getQueueInSize()
getQueueInSize
in interface ProxyMBean
public int getQueueOutSize()
getQueueOutSize
in interface ProxyMBean
public Set<String> getExclusiveQueues()
getExclusiveQueues
in interface ProxyMBean
public Integer[] getOpenedChannels()
getOpenedChannels
in interface ProxyMBean
Copyright © 2021 ScalAgent D.T.. All rights reserved.