public final class AmqpChannel extends Object
Modifier and Type | Method and Description |
---|---|
AmqpChannel |
ackBasic(long deliveryTag,
boolean multiple)
This method acknowledges one or more messages delivered via the Deliver or Get-Ok methods.
|
void |
addChannelListener(ChannelListener listener)
Adds the specified ChannelListener allowing the application to listen
to the channel's lifecycle events.
|
AmqpChannel |
bindQueue(String queue,
String exchange,
String routingKey,
boolean noWait,
AmqpArguments arguments)
* This method binds a queue to an exchange.
|
AmqpChannel |
cancelBasic(String consumerTag,
boolean noWait)
This method cancels a consumer.
|
AmqpChannel |
closeChannel(int replyCode,
String replyText,
int classId,
int methodId1)
This method indicates that the sender wants to close the channel.
|
AmqpChannel |
commitTx()
This method commits all message publications and acknowledgments performed in the current transaction.
|
AmqpChannel |
consumeBasic(String queue,
String consumerTag,
boolean noLocal,
boolean noAck,
boolean exclusive,
boolean noWait,
AmqpArguments arguments)
This method asks the server to start a "consumer", which is a transient request for messages from a specific queue.
|
AmqpChannel |
declareExchange(String exchange,
String type,
boolean passive,
boolean durable,
boolean noWait,
AmqpArguments arguments)
This method creates an exchange if it does not already exist, and if the exchange exists, verifies that it is of the correct and expected class.
|
AmqpChannel |
declareQueue(String queue,
boolean passive,
boolean durable,
boolean exclusive,
boolean autoDelete,
boolean noWait,
AmqpArguments arguments)
This method creates or checks a queue.
|
AmqpChannel |
deleteExchange(String exchange,
boolean ifUnused,
boolean noWait)
This method deletes an exchange.
|
AmqpChannel |
deleteQueue(String queue,
boolean ifUnused,
boolean ifEmpty,
boolean noWait)
This method deletes a queue.
|
AmqpChannel |
flowChannel(boolean active)
This method asks the peer to pause or restart the flow of content data sent by a consumer.
|
AmqpChannel |
flowOkChannel(boolean active)
Confirms to the peer that a flow command was received and processed.
|
AmqpClient |
getAmqpClient()
Returns the Client/Connection that is used to multiplex the channel.
|
AmqpChannel |
getBasic(String queue,
boolean noAck)
Gets messages from the queue and dispatches it to the listener
|
List<ChannelListener> |
getChannelListeners()
Returns the list of ChannelListeners registered with this AmqpChannel instance.
|
AmqpChannel |
publishBasic(ByteBuffer body,
AmqpProperties properties,
String exchange,
String routingKey,
boolean mandatory,
boolean immediate)
This method publishes a message to a specific exchange.
|
AmqpChannel |
purgeQueue(String queue,
boolean noWait)
This method removes all messages from a queue which are not awaiting acknowledgment.
|
AmqpChannel |
qosBasic(int prefetchSize,
int prefetchCount,
boolean global)
This method requests a specific quality of service.
|
AmqpChannel |
recoverBasic(boolean requeue)
This method asks the server to redeliver all unacknowledged messages on a specified channel.
|
AmqpChannel |
rejectBasic(long deliveryTag,
boolean requeue)
This method allows a client to reject a message.
|
void |
removeChannelListener(ChannelListener listener)
Removes the specified ChannelListener.
|
AmqpChannel |
rollbackTx()
This method abandons all message publications and acknowledgments performed in the current transaction.
|
AmqpChannel |
selectTx()
This method sets the channel to use standard transactions.
|
AmqpChannel |
unbindQueue(String queue,
String exchange,
String routingKey,
AmqpArguments arguments)
This method unbinds a queue from an exchange.
|
public void addChannelListener(ChannelListener listener)
listener
- ChannelListener to be added to receive eventspublic AmqpClient getAmqpClient()
public List<ChannelListener> getChannelListeners()
public void removeChannelListener(ChannelListener listener)
listener
- ChannelListener to be deletedpublic AmqpChannel flowChannel(boolean active)
enabled
- If true, the peer starts sending content frames, else the peer stops sending content frames.public AmqpChannel flowOkChannel(boolean active)
active
- callback
- error
- public AmqpChannel closeChannel(int replyCode, String replyText, int classId, int methodId1)
replyCode
- replyText
- classId
- methodId1
- public AmqpChannel declareExchange(String exchange, String type, boolean passive, boolean durable, boolean noWait, AmqpArguments arguments)
exchange
- type
- passive
- durable
- noWait
- arguments
- public AmqpChannel deleteExchange(String exchange, boolean ifUnused, boolean noWait)
exchange
- ifUnused
- noWait
- public AmqpChannel declareQueue(String queue, boolean passive, boolean durable, boolean exclusive, boolean autoDelete, boolean noWait, AmqpArguments arguments)
queue
- passive
- durable
- exclusive
- autoDelete
- noWait
- arguments
- public AmqpChannel deleteQueue(String queue, boolean ifUnused, boolean ifEmpty, boolean noWait)
queue
- ifUnused
- ifEmpty
- noWait
- public AmqpChannel bindQueue(String queue, String exchange, String routingKey, boolean noWait, AmqpArguments arguments)
public AmqpChannel unbindQueue(String queue, String exchange, String routingKey, AmqpArguments arguments)
queue
- exchange
- routingKey
- arguments
- public AmqpChannel purgeQueue(String queue, boolean noWait)
queue
- noWait
- public AmqpChannel qosBasic(int prefetchSize, int prefetchCount, boolean global)
prefetchSize
- prefetchCount
- global
- public AmqpChannel consumeBasic(String queue, String consumerTag, boolean noLocal, boolean noAck, boolean exclusive, boolean noWait, AmqpArguments arguments)
queue
- consumerTag
- noLocal
- noAck
- exclusive
- noWait
- arguments
- public AmqpChannel cancelBasic(String consumerTag, boolean noWait)
consumerTag
- noWait
- public AmqpChannel publishBasic(ByteBuffer body, AmqpProperties properties, String exchange, String routingKey, boolean mandatory, boolean immediate)
body
- headers
- exchange
- routingKey
- mandatory
- immediate
- public AmqpChannel getBasic(String queue, boolean noAck)
queue
- noAck
- public AmqpChannel ackBasic(long deliveryTag, boolean multiple)
deliveryTag
- multiple
- public AmqpChannel rejectBasic(long deliveryTag, boolean requeue)
deliveryTag
- requeue
- public AmqpChannel recoverBasic(boolean requeue)
requeue
- public AmqpChannel selectTx()
public AmqpChannel commitTx()
public AmqpChannel rollbackTx()
Copyright © 2014. All Rights Reserved.