|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.rabbitmq.client.impl.ShutdownNotifierComponent
com.rabbitmq.client.impl.AMQChannel
com.rabbitmq.client.impl.ChannelN
public class ChannelN
Main interface to AMQP protocol functionality. Public API - Implementation of all AMQChannels except channel zero.
To open a channel,
Connectionconn = ...;ChannelNch1 = conn.createChannel();
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.rabbitmq.client.impl.AMQChannel |
|---|
AMQChannel.BlockingRpcContinuation<T>, AMQChannel.RpcContinuation, AMQChannel.SimpleBlockingRpcContinuation |
| Field Summary |
|---|
| Fields inherited from class com.rabbitmq.client.impl.AMQChannel |
|---|
_blockContent, _channelMutex |
| Constructor Summary | |
|---|---|
ChannelN(AMQConnection connection,
int channelNumber,
com.rabbitmq.client.impl.ConsumerWorkService workService)
Construct a new channel on the given connection with the given channel number. |
|
| Method Summary | |
|---|---|
void |
abort()
Public API - Abort this channel with the AMQP.REPLY_SUCCESS close code
and message 'OK'. |
void |
abort(int closeCode,
java.lang.String closeMessage)
Public API - Abort this channel. |
void |
addConfirmListener(ConfirmListener listener)
Add a ConfirmListener. |
void |
addFlowListener(FlowListener listener)
Add a FlowListener. |
void |
addReturnListener(ReturnListener listener)
Add a ReturnListener. |
void |
asyncRpc(Method method)
Asynchronously send a method over this channel. |
void |
basicAck(long deliveryTag,
boolean multiple)
Public API - Acknowledge one or several received messages. |
void |
basicCancel(java.lang.String consumerTag)
Public API - Cancel a consumer. |
java.lang.String |
basicConsume(java.lang.String queue,
boolean autoAck,
Consumer callback)
Public API - Start a non-nolocal, non-exclusive consumer, with a server-generated consumerTag. |
java.lang.String |
basicConsume(java.lang.String queue,
boolean autoAck,
java.lang.String consumerTag,
boolean noLocal,
boolean exclusive,
java.util.Map<java.lang.String,java.lang.Object> arguments,
Consumer callback)
Public API - Start a consumer. |
java.lang.String |
basicConsume(java.lang.String queue,
boolean autoAck,
java.lang.String consumerTag,
Consumer callback)
Public API - Start a non-nolocal, non-exclusive consumer. |
java.lang.String |
basicConsume(java.lang.String queue,
Consumer callback)
Public API - Start a non-nolocal, non-exclusive consumer, with explicit acknowledgement and a server-generated consumerTag. |
GetResponse |
basicGet(java.lang.String queue,
boolean autoAck)
Public API - Retrieve a message from a queue using AMQP.Basic.Get |
void |
basicNack(long deliveryTag,
boolean multiple,
boolean requeue)
Public API - Reject one or several received messages. |
void |
basicPublish(java.lang.String exchange,
java.lang.String routingKey,
AMQP.BasicProperties props,
byte[] body)
Public API - Publish a message |
void |
basicPublish(java.lang.String exchange,
java.lang.String routingKey,
boolean mandatory,
AMQP.BasicProperties props,
byte[] body)
Public API - Publish a message |
void |
basicPublish(java.lang.String exchange,
java.lang.String routingKey,
boolean mandatory,
boolean immediate,
AMQP.BasicProperties props,
byte[] body)
Public API - Publish a message |
void |
basicQos(int prefetchCount)
Public API - Request a specific prefetchCount "quality of service" settings for this channel. |
void |
basicQos(int prefetchSize,
int prefetchCount,
boolean global)
Public API - Request specific "quality of service" settings. |
AMQImpl.Basic.RecoverOk |
basicRecover()
Public API - Ask the broker to resend unacknowledged messages. |
AMQImpl.Basic.RecoverOk |
basicRecover(boolean requeue)
Public API - Ask the broker to resend unacknowledged messages. |
void |
basicRecoverAsync(boolean requeue)
Public API - Ask the broker to resend unacknowledged messages. |
void |
basicReject(long deliveryTag,
boolean requeue)
Public API - Reject a message. |
void |
clearConfirmListeners()
Remove all ConfirmListeners. |
void |
clearFlowListeners()
Remove all FlowListeners. |
void |
clearReturnListeners()
Remove all ReturnListeners. |
void |
close()
Public API - Close this channel with the AMQP.REPLY_SUCCESS close code
and message 'OK'. |
void |
close(int closeCode,
java.lang.String closeMessage)
Public API - Close this channel. |
void |
close(int closeCode,
java.lang.String closeMessage,
boolean initiatedByApplication,
java.lang.Throwable cause,
boolean abort)
Protected API - Close channel with code and message, indicating the source of the closure and a causing exception (null if none). |
AMQImpl.Confirm.SelectOk |
confirmSelect()
Public API - Enables publisher acknowledgements on this channel. |
AMQImpl.Exchange.BindOk |
exchangeBind(java.lang.String destination,
java.lang.String source,
java.lang.String routingKey)
Public API - Bind an exchange to an exchange, with no extra arguments. |
AMQImpl.Exchange.BindOk |
exchangeBind(java.lang.String destination,
java.lang.String source,
java.lang.String routingKey,
java.util.Map<java.lang.String,java.lang.Object> arguments)
Public API - Bind an exchange to an exchange. |
AMQImpl.Exchange.DeclareOk |
exchangeDeclare(java.lang.String exchange,
java.lang.String type)
Public API - Actively declare a non-autodelete, non-durable exchange with no extra arguments |
AMQImpl.Exchange.DeclareOk |
exchangeDeclare(java.lang.String exchange,
java.lang.String type,
boolean durable)
Public API - Actively declare a non-autodelete exchange with no extra arguments |
AMQImpl.Exchange.DeclareOk |
exchangeDeclare(java.lang.String exchange,
java.lang.String type,
boolean durable,
boolean autoDelete,
boolean internal,
java.util.Map<java.lang.String,java.lang.Object> arguments)
Public API - Declare an exchange, via an interface that allows the complete set of arguments. |
AMQImpl.Exchange.DeclareOk |
exchangeDeclare(java.lang.String exchange,
java.lang.String type,
boolean durable,
boolean autoDelete,
java.util.Map<java.lang.String,java.lang.Object> arguments)
Public API - Declare an exchange. |
AMQImpl.Exchange.DeclareOk |
exchangeDeclarePassive(java.lang.String exchange)
Public API - Declare an exchange passively; that is, check if the named exchange exists. |
AMQImpl.Exchange.DeleteOk |
exchangeDelete(java.lang.String exchange)
Public API - Delete an exchange, without regard for whether it is in use or not |
AMQImpl.Exchange.DeleteOk |
exchangeDelete(java.lang.String exchange,
boolean ifUnused)
Public API - Delete an exchange |
AMQImpl.Exchange.UnbindOk |
exchangeUnbind(java.lang.String destination,
java.lang.String source,
java.lang.String routingKey)
Public API - Unbind an exchange from an exchange, with no extra arguments. |
AMQImpl.Exchange.UnbindOk |
exchangeUnbind(java.lang.String destination,
java.lang.String source,
java.lang.String routingKey,
java.util.Map<java.lang.String,java.lang.Object> arguments)
Public API - Unbind an exchange from an exchange. |
AMQImpl.Channel.FlowOk |
flow(boolean a)
Public API - Set flow on the channel |
Consumer |
getDefaultConsumer()
Returns the current default consumer. |
AMQImpl.Channel.FlowOk |
getFlow()
Public API - Return the current Channel.Flow settings. |
long |
getNextPublishSeqNo()
Public API - When in confirm mode, returns the sequence number of the next message to be published. |
void |
open()
Package method: open the channel. |
boolean |
processAsync(Command command)
Protected API - Filters the inbound command stream, processing Basic.Deliver, Basic.Return and Channel.Close specially. |
void |
processShutdownSignal(ShutdownSignalException signal,
boolean ignoreClosed,
boolean notifyRpc)
Protected API - overridden to quiesce consumer work and broadcast the signal to all consumers after calling the superclass's method. |
AMQImpl.Queue.BindOk |
queueBind(java.lang.String queue,
java.lang.String exchange,
java.lang.String routingKey)
Public API - Bind a queue to an exchange, with no extra arguments. |
AMQImpl.Queue.BindOk |
queueBind(java.lang.String queue,
java.lang.String exchange,
java.lang.String routingKey,
java.util.Map<java.lang.String,java.lang.Object> arguments)
Public API - Bind a queue to an exchange. |
AMQP.Queue.DeclareOk |
queueDeclare()
Public API - Actively declare a server-named exclusive, autodelete, non-durable queue. |
AMQImpl.Queue.DeclareOk |
queueDeclare(java.lang.String queue,
boolean durable,
boolean exclusive,
boolean autoDelete,
java.util.Map<java.lang.String,java.lang.Object> arguments)
Public API - Declare a queue |
AMQImpl.Queue.DeclareOk |
queueDeclarePassive(java.lang.String queue)
Public API - Declare a queue passively; i.e., check if it exists. |
AMQImpl.Queue.DeleteOk |
queueDelete(java.lang.String queue)
Public API - Delete a queue, without regard for whether it is in use or has messages on it |
AMQImpl.Queue.DeleteOk |
queueDelete(java.lang.String queue,
boolean ifUnused,
boolean ifEmpty)
Public API - Delete a queue |
AMQImpl.Queue.PurgeOk |
queuePurge(java.lang.String queue)
Public API - Purges the contents of the given queue. |
AMQImpl.Queue.UnbindOk |
queueUnbind(java.lang.String queue,
java.lang.String exchange,
java.lang.String routingKey)
Public API - Unbinds a queue from an exchange, with no extra arguments. |
AMQImpl.Queue.UnbindOk |
queueUnbind(java.lang.String queue,
java.lang.String exchange,
java.lang.String routingKey,
java.util.Map<java.lang.String,java.lang.Object> arguments)
Public API - Unbind a queue from an exchange. |
boolean |
removeConfirmListener(ConfirmListener listener)
Remove a ConfirmListener. |
boolean |
removeFlowListener(FlowListener listener)
Remove a FlowListener. |
boolean |
removeReturnListener(ReturnListener listener)
Remove a ReturnListener. |
AMQCommand |
rpc(Method method)
Protected API - sends a Method to the broker and waits for the
next in-bound Command from the broker: only for use from
non-connection-MainLoop threads! |
void |
setDefaultConsumer(Consumer consumer)
Sets the current default consumer. |
AMQImpl.Tx.CommitOk |
txCommit()
Public API - Commits a TX transaction on this channel. |
AMQImpl.Tx.RollbackOk |
txRollback()
Public API - Rolls back a TX transaction on this channel. |
AMQImpl.Tx.SelectOk |
txSelect()
Public API - Enables TX mode on this channel. |
boolean |
waitForConfirms()
Wait until all messages published since the last call have been either ack'd or nack'd by the broker. |
boolean |
waitForConfirms(long timeout)
Wait until all messages published since the last call have been either ack'd or nack'd by the broker; or until timeout elapses. |
void |
waitForConfirmsOrDie()
Wait until all messages published since the last call have been either ack'd or nack'd by the broker. |
void |
waitForConfirmsOrDie(long timeout)
Wait until all messages published since the last call have been either ack'd or nack'd by the broker; or until timeout elapses. |
| Methods inherited from class com.rabbitmq.client.impl.AMQChannel |
|---|
enqueueRpc, ensureIsOpen, exnWrappingRpc, getChannelNumber, getConnection, handleCompleteInboundCommand, handleFrame, isOutstandingRpc, nextOutstandingRpc, notifyOutstandingRpc, quiescingRpc, quiescingTransmit, quiescingTransmit, rpc, toString, transmit, transmit, wrap, wrap |
| Methods inherited from class com.rabbitmq.client.impl.ShutdownNotifierComponent |
|---|
addShutdownListener, getCloseReason, isOpen, notifyListeners, removeShutdownListener, setShutdownCauseIfOpen |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.rabbitmq.client.Channel |
|---|
getChannelNumber, getConnection |
| Methods inherited from interface com.rabbitmq.client.ShutdownNotifier |
|---|
addShutdownListener, getCloseReason, isOpen, notifyListeners, removeShutdownListener |
| Constructor Detail |
|---|
public ChannelN(AMQConnection connection,
int channelNumber,
com.rabbitmq.client.impl.ConsumerWorkService workService)
connection - The connection associated with this channelchannelNumber - The channel number to be associated with this channelworkService - service for managing this channel's consumer callbacksConnection.createChannel()| Method Detail |
|---|
public void open()
throws java.io.IOException
ChannelManager.
java.io.IOException - if any problem is encounteredpublic void addReturnListener(ReturnListener listener)
ChannelReturnListener.
addReturnListener in interface Channellistener - the listener to addpublic boolean removeReturnListener(ReturnListener listener)
ChannelReturnListener.
removeReturnListener in interface Channellistener - the listener to remove
true if the listener was found and removed,
false otherwisepublic void clearReturnListeners()
ChannelReturnListeners.
clearReturnListeners in interface Channelpublic void addFlowListener(FlowListener listener)
ChannelFlowListener.
addFlowListener in interface Channellistener - the listener to addpublic boolean removeFlowListener(FlowListener listener)
ChannelFlowListener.
removeFlowListener in interface Channellistener - the listener to remove
true if the listener was found and removed,
false otherwisepublic void clearFlowListeners()
ChannelFlowListeners.
clearFlowListeners in interface Channelpublic void addConfirmListener(ConfirmListener listener)
ChannelConfirmListener.
addConfirmListener in interface Channellistener - the listener to addpublic boolean removeConfirmListener(ConfirmListener listener)
ChannelConfirmListener.
removeConfirmListener in interface Channellistener - the listener to remove
true if the listener was found and removed,
false otherwisepublic void clearConfirmListeners()
ChannelConfirmListeners.
clearConfirmListeners in interface Channel
public boolean waitForConfirms()
throws java.lang.InterruptedException
waitForConfirms in interface Channeljava.lang.InterruptedException
public boolean waitForConfirms(long timeout)
throws java.lang.InterruptedException,
java.util.concurrent.TimeoutException
waitForConfirms in interface Channeljava.lang.InterruptedException
java.util.concurrent.TimeoutException
public void waitForConfirmsOrDie()
throws java.io.IOException,
java.lang.InterruptedException
waitForConfirmsOrDie in interface Channeljava.io.IOException
java.lang.InterruptedException
public void waitForConfirmsOrDie(long timeout)
throws java.io.IOException,
java.lang.InterruptedException,
java.util.concurrent.TimeoutException
waitForConfirmsOrDie in interface Channeljava.io.IOException
java.lang.InterruptedException
java.util.concurrent.TimeoutExceptionpublic Consumer getDefaultConsumer()
getDefaultConsumer in interface Channelpublic void setDefaultConsumer(Consumer consumer)
setDefaultConsumer in interface Channelconsumer - the consumer to use, or null indicating "don't use one".
public void processShutdownSignal(ShutdownSignalException signal,
boolean ignoreClosed,
boolean notifyRpc)
processShutdownSignal in class AMQChannelsignal - the signal to handleignoreClosed - the flag indicating whether to ignore the AlreadyClosedException
thrown when the channel is already closednotifyRpc - the flag indicating whether any remaining rpc continuation should be
notified with the given signal
public boolean processAsync(Command command)
throws java.io.IOException
processAsync in class AMQChannelcommand - the command to handle asynchronously
java.io.IOException
public void close()
throws java.io.IOException
AMQP.REPLY_SUCCESS close code
and message 'OK'.
close in interface Channeljava.io.IOException - if an error is encountered
public void close(int closeCode,
java.lang.String closeMessage)
throws java.io.IOException
close in interface ChannelcloseCode - the close code (See under "Reply Codes" in the AMQP specification)closeMessage - a message indicating the reason for closing the connection
java.io.IOException - if an error is encountered
public void abort()
throws java.io.IOException
AMQP.REPLY_SUCCESS close code
and message 'OK'.
Forces the channel to close and waits for the close operation to complete.
Any encountered exceptions in the close operation are silently discarded.
abort in interface Channeljava.io.IOException
public void abort(int closeCode,
java.lang.String closeMessage)
throws java.io.IOException
abort in interface Channeljava.io.IOException
public void close(int closeCode,
java.lang.String closeMessage,
boolean initiatedByApplication,
java.lang.Throwable cause,
boolean abort)
throws java.io.IOException
closeCode - the close code (See under "Reply Codes" in the AMQP specification)closeMessage - a message indicating the reason for closing the connectioninitiatedByApplication - true if this comes from an API call, false otherwisecause - exception triggering closeabort - true if we should close and ignore errors
java.io.IOException - if an error is encountered
public void basicQos(int prefetchSize,
int prefetchCount,
boolean global)
throws java.io.IOException
basicQos in interface ChannelprefetchSize - maximum amount of content (measured in
octets) that the server will deliver, 0 if unlimitedprefetchCount - maximum number of messages that the server
will deliver, 0 if unlimitedglobal - true if the settings should be applied to the
entire connection rather than just the current channel
java.io.IOException - if an error is encounteredAMQP.Basic.Qos
public void basicQos(int prefetchCount)
throws java.io.IOException
basicQos in interface ChannelprefetchCount - maximum number of messages that the server
will deliver, 0 if unlimited
java.io.IOException - if an error is encounteredChannel.basicQos(int, int, boolean)
public void basicPublish(java.lang.String exchange,
java.lang.String routingKey,
AMQP.BasicProperties props,
byte[] body)
throws java.io.IOException
basicPublish in interface Channelexchange - the exchange to publish the message toroutingKey - the routing keyprops - other properties for the message - routing headers etcbody - the message body
java.io.IOException - if an error is encounteredAMQP.Basic.Publish
public void basicPublish(java.lang.String exchange,
java.lang.String routingKey,
boolean mandatory,
AMQP.BasicProperties props,
byte[] body)
throws java.io.IOException
basicPublish in interface Channelexchange - the exchange to publish the message toroutingKey - the routing keymandatory - true if the 'mandatory' flag is to be setprops - other properties for the message - routing headers etcbody - the message body
java.io.IOException - if an error is encounteredAMQP.Basic.Publish
public void basicPublish(java.lang.String exchange,
java.lang.String routingKey,
boolean mandatory,
boolean immediate,
AMQP.BasicProperties props,
byte[] body)
throws java.io.IOException
basicPublish in interface Channelexchange - the exchange to publish the message toroutingKey - the routing keymandatory - true if the 'mandatory' flag is to be setimmediate - true if the 'immediate' flag is to be
set. Note that the RabbitMQ server does not support this flag.props - other properties for the message - routing headers etcbody - the message body
java.io.IOException - if an error is encounteredAMQP.Basic.Publish
public AMQImpl.Exchange.DeclareOk exchangeDeclare(java.lang.String exchange,
java.lang.String type,
boolean durable,
boolean autoDelete,
java.util.Map<java.lang.String,java.lang.Object> arguments)
throws java.io.IOException
exchangeDeclare in interface Channelexchange - the name of the exchangetype - the exchange typedurable - true if we are declaring a durable exchange (the exchange will survive a server restart)autoDelete - true if the server should delete the exchange when it is no longer in usearguments - other properties (construction arguments) for the exchange
java.io.IOException - if an error is encounteredAMQP.Exchange.Declare,
AMQP.Exchange.DeclareOk
public AMQImpl.Exchange.DeclareOk exchangeDeclare(java.lang.String exchange,
java.lang.String type,
boolean durable,
boolean autoDelete,
boolean internal,
java.util.Map<java.lang.String,java.lang.Object> arguments)
throws java.io.IOException
exchangeDeclare in interface Channelexchange - the name of the exchangetype - the exchange typedurable - true if we are declaring a durable exchange (the exchange will survive a server restart)autoDelete - true if the server should delete the exchange when it is no longer in useinternal - true if the exchange is internal, i.e. can't be directly
published to by a client.arguments - other properties (construction arguments) for the exchange
java.io.IOException - if an error is encounteredAMQP.Exchange.Declare,
AMQP.Exchange.DeclareOk
public AMQImpl.Exchange.DeclareOk exchangeDeclare(java.lang.String exchange,
java.lang.String type,
boolean durable)
throws java.io.IOException
exchangeDeclare in interface Channelexchange - the name of the exchangetype - the exchange typedurable - true if we are declaring a durable exchange (the exchange will survive a server restart)
java.io.IOException - if an error is encounteredAMQP.Exchange.Declare,
AMQP.Exchange.DeclareOk
public AMQImpl.Exchange.DeclareOk exchangeDeclare(java.lang.String exchange,
java.lang.String type)
throws java.io.IOException
exchangeDeclare in interface Channelexchange - the name of the exchangetype - the exchange type
java.io.IOException - if an error is encounteredAMQP.Exchange.Declare,
AMQP.Exchange.DeclareOk
public AMQImpl.Exchange.DeclareOk exchangeDeclarePassive(java.lang.String exchange)
throws java.io.IOException
exchangeDeclarePassive in interface Channelexchange - check the existence of an exchange named this
java.io.IOException - the server will raise a 404 channel exception if the named exchange does not exist.
public AMQImpl.Exchange.DeleteOk exchangeDelete(java.lang.String exchange,
boolean ifUnused)
throws java.io.IOException
exchangeDelete in interface Channelexchange - the name of the exchangeifUnused - true to indicate that the exchange is only to be deleted if it is unused
java.io.IOException - if an error is encounteredAMQP.Exchange.Delete,
AMQP.Exchange.DeleteOk
public AMQImpl.Exchange.DeleteOk exchangeDelete(java.lang.String exchange)
throws java.io.IOException
exchangeDelete in interface Channelexchange - the name of the exchange
java.io.IOException - if an error is encounteredAMQP.Exchange.Delete,
AMQP.Exchange.DeleteOk
public AMQImpl.Exchange.BindOk exchangeBind(java.lang.String destination,
java.lang.String source,
java.lang.String routingKey,
java.util.Map<java.lang.String,java.lang.Object> arguments)
throws java.io.IOException
exchangeBind in interface Channeldestination - the name of the exchange to which messages flow across the bindingsource - the name of the exchange from which messages flow across the bindingroutingKey - the routine key to use for the bindingarguments - other properties (binding parameters)
java.io.IOException - if an error is encounteredAMQP.Exchange.Bind,
AMQP.Exchange.BindOk
public AMQImpl.Exchange.BindOk exchangeBind(java.lang.String destination,
java.lang.String source,
java.lang.String routingKey)
throws java.io.IOException
exchangeBind in interface Channeldestination - the name of the exchange to which messages flow across the bindingsource - the name of the exchange from which messages flow across the bindingroutingKey - the routine key to use for the binding
java.io.IOException - if an error is encounteredAMQP.Exchange.Bind,
AMQP.Exchange.BindOk
public AMQImpl.Exchange.UnbindOk exchangeUnbind(java.lang.String destination,
java.lang.String source,
java.lang.String routingKey,
java.util.Map<java.lang.String,java.lang.Object> arguments)
throws java.io.IOException
exchangeUnbind in interface Channeldestination - the name of the exchange to which messages flow across the bindingsource - the name of the exchange from which messages flow across the bindingroutingKey - the routine key to use for the bindingarguments - other properties (binding parameters)
java.io.IOException - if an error is encounteredAMQP.Exchange.Bind,
AMQP.Exchange.BindOk
public AMQImpl.Exchange.UnbindOk exchangeUnbind(java.lang.String destination,
java.lang.String source,
java.lang.String routingKey)
throws java.io.IOException
exchangeUnbind in interface Channeldestination - the name of the exchange to which messages flow across the bindingsource - the name of the exchange from which messages flow across the bindingroutingKey - the routine key to use for the binding
java.io.IOException - if an error is encounteredAMQP.Exchange.Bind,
AMQP.Exchange.BindOk
public AMQImpl.Queue.DeclareOk queueDeclare(java.lang.String queue,
boolean durable,
boolean exclusive,
boolean autoDelete,
java.util.Map<java.lang.String,java.lang.Object> arguments)
throws java.io.IOException
queueDeclare in interface Channelqueue - the name of the queuedurable - true if we are declaring a durable queue (the queue will survive a server restart)exclusive - true if we are declaring an exclusive queue (restricted to this connection)autoDelete - true if we are declaring an autodelete queue (server will delete it when no longer in use)arguments - other properties (construction arguments) for the queue
java.io.IOException - if an error is encounteredAMQP.Queue.Declare,
AMQP.Queue.DeclareOk
public AMQP.Queue.DeclareOk queueDeclare()
throws java.io.IOException
AMQP.Queue.DeclareOk result.
queueDeclare in interface Channeljava.io.IOException - if an error is encounteredAMQP.Queue.Declare,
AMQP.Queue.DeclareOk
public AMQImpl.Queue.DeclareOk queueDeclarePassive(java.lang.String queue)
throws java.io.IOException
queueDeclarePassive in interface Channelqueue - the name of the queue
java.io.IOException - if an error is encountered,
including if the queue does not exist and if the queue is
exclusively owned by another connection.AMQP.Queue.Declare,
AMQP.Queue.DeclareOk
public AMQImpl.Queue.DeleteOk queueDelete(java.lang.String queue,
boolean ifUnused,
boolean ifEmpty)
throws java.io.IOException
queueDelete in interface Channelqueue - the name of the queueifUnused - true if the queue should be deleted only if not in useifEmpty - true if the queue should be deleted only if empty
java.io.IOException - if an error is encounteredAMQP.Queue.Delete,
AMQP.Queue.DeleteOk
public AMQImpl.Queue.DeleteOk queueDelete(java.lang.String queue)
throws java.io.IOException
queueDelete in interface Channelqueue - the name of the queue
java.io.IOException - if an error is encounteredAMQP.Queue.Delete,
AMQP.Queue.DeleteOk
public AMQImpl.Queue.BindOk queueBind(java.lang.String queue,
java.lang.String exchange,
java.lang.String routingKey,
java.util.Map<java.lang.String,java.lang.Object> arguments)
throws java.io.IOException
queueBind in interface Channelqueue - the name of the queueexchange - the name of the exchangeroutingKey - the routine key to use for the bindingarguments - other properties (binding parameters)
java.io.IOException - if an error is encounteredAMQP.Queue.Bind,
AMQP.Queue.BindOk
public AMQImpl.Queue.BindOk queueBind(java.lang.String queue,
java.lang.String exchange,
java.lang.String routingKey)
throws java.io.IOException
queueBind in interface Channelqueue - the name of the queueexchange - the name of the exchangeroutingKey - the routine key to use for the binding
java.io.IOException - if an error is encounteredAMQP.Queue.Bind,
AMQP.Queue.BindOk
public AMQImpl.Queue.UnbindOk queueUnbind(java.lang.String queue,
java.lang.String exchange,
java.lang.String routingKey,
java.util.Map<java.lang.String,java.lang.Object> arguments)
throws java.io.IOException
queueUnbind in interface Channelqueue - the name of the queueexchange - the name of the exchangeroutingKey - the routine key to use for the bindingarguments - other properties (binding parameters)
java.io.IOException - if an error is encounteredAMQP.Queue.Unbind,
AMQP.Queue.UnbindOk
public AMQImpl.Queue.PurgeOk queuePurge(java.lang.String queue)
throws java.io.IOException
queuePurge in interface Channelqueue - the name of the queue
java.io.IOException - if an error is encounteredAMQP.Queue.Purge,
AMQP.Queue.PurgeOk
public AMQImpl.Queue.UnbindOk queueUnbind(java.lang.String queue,
java.lang.String exchange,
java.lang.String routingKey)
throws java.io.IOException
queueUnbind in interface Channelqueue - the name of the queueexchange - the name of the exchangeroutingKey - the routine key to use for the binding
java.io.IOException - if an error is encounteredAMQP.Queue.Unbind,
AMQP.Queue.UnbindOk
public GetResponse basicGet(java.lang.String queue,
boolean autoAck)
throws java.io.IOException
AMQP.Basic.Get
basicGet in interface Channelqueue - the name of the queueautoAck - true if the server should consider messages
acknowledged once delivered; false if the server should expect
explicit acknowledgements
GetResponse containing the retrieved message data
java.io.IOException - if an error is encounteredAMQP.Basic.Get,
AMQP.Basic.GetOk,
AMQP.Basic.GetEmpty
public void basicAck(long deliveryTag,
boolean multiple)
throws java.io.IOException
AMQP.Basic.GetOk
or AMQP.Basic.Deliver method
containing the received message being acknowledged.
basicAck in interface ChanneldeliveryTag - the tag from the received AMQP.Basic.GetOk or AMQP.Basic.Delivermultiple - true to acknowledge all messages up to and
including the supplied delivery tag; false to acknowledge just
the supplied delivery tag.
java.io.IOException - if an error is encounteredAMQP.Basic.Ack
public void basicNack(long deliveryTag,
boolean multiple,
boolean requeue)
throws java.io.IOException
deliveryTag from the AMQP.Basic.GetOk
or AMQP.Basic.GetOk method containing the message to be rejected.
basicNack in interface ChanneldeliveryTag - the tag from the received AMQP.Basic.GetOk or AMQP.Basic.Delivermultiple - true to reject all messages up to and including
the supplied delivery tag; false to reject just the supplied
delivery tag.requeue - true if the rejected message(s) should be requeued rather
than discarded/dead-lettered
java.io.IOException - if an error is encounteredAMQP.Basic.Nack
public void basicReject(long deliveryTag,
boolean requeue)
throws java.io.IOException
AMQP.Basic.GetOk
or AMQP.Basic.Deliver method
containing the received message being rejected.
basicReject in interface ChanneldeliveryTag - the tag from the received AMQP.Basic.GetOk or AMQP.Basic.Deliverrequeue - true if the rejected message should be requeued rather than discarded/dead-lettered
java.io.IOException - if an error is encounteredAMQP.Basic.Reject
public java.lang.String basicConsume(java.lang.String queue,
Consumer callback)
throws java.io.IOException
basicConsume in interface Channelqueue - the name of the queuecallback - an interface to the consumer object
java.io.IOException - if an error is encounteredAMQP.Basic.Consume,
AMQP.Basic.ConsumeOk,
Channel.basicAck(long, boolean),
Channel.basicConsume(String, boolean, String, boolean, boolean, Map, Consumer)
public java.lang.String basicConsume(java.lang.String queue,
boolean autoAck,
Consumer callback)
throws java.io.IOException
basicConsume in interface Channelqueue - the name of the queueautoAck - true if the server should consider messages
acknowledged once delivered; false if the server should expect
explicit acknowledgementscallback - an interface to the consumer object
java.io.IOException - if an error is encounteredAMQP.Basic.Consume,
AMQP.Basic.ConsumeOk,
Channel.basicConsume(String, boolean, String, boolean, boolean, Map, Consumer)
public java.lang.String basicConsume(java.lang.String queue,
boolean autoAck,
java.lang.String consumerTag,
Consumer callback)
throws java.io.IOException
basicConsume in interface Channelqueue - the name of the queueautoAck - true if the server should consider messages
acknowledged once delivered; false if the server should expect
explicit acknowledgementsconsumerTag - a client-generated consumer tag to establish contextcallback - an interface to the consumer object
java.io.IOException - if an error is encounteredAMQP.Basic.Consume,
AMQP.Basic.ConsumeOk,
Channel.basicConsume(String, boolean, String, boolean, boolean, Map, Consumer)
public java.lang.String basicConsume(java.lang.String queue,
boolean autoAck,
java.lang.String consumerTag,
boolean noLocal,
boolean exclusive,
java.util.Map<java.lang.String,java.lang.Object> arguments,
Consumer callback)
throws java.io.IOException
Consumer.handleConsumeOk(java.lang.String)
method.
basicConsume in interface Channelqueue - the name of the queueautoAck - true if the server should consider messages
acknowledged once delivered; false if the server should expect
explicit acknowledgementsconsumerTag - a client-generated consumer tag to establish contextnoLocal - true if the server should not deliver to this consumer
messages published on this channel's connectionexclusive - true if this is an exclusive consumerarguments - a set of arguments for the consumecallback - an interface to the consumer object
java.io.IOException - if an error is encounteredAMQP.Basic.Consume,
AMQP.Basic.ConsumeOk
public void basicCancel(java.lang.String consumerTag)
throws java.io.IOException
Consumer.handleCancelOk(java.lang.String)
method.
basicCancel in interface ChannelconsumerTag - a client- or server-generated consumer tag to establish context
java.io.IOException - if an error is encountered, or if the consumerTag is unknownAMQP.Basic.Cancel,
AMQP.Basic.CancelOk
public AMQImpl.Basic.RecoverOk basicRecover()
throws java.io.IOException
basicRecover(true), messages
will be requeued and possibly delivered to a different consumer.
basicRecover in interface Channeljava.io.IOExceptionChannel.basicRecover(boolean)
public AMQImpl.Basic.RecoverOk basicRecover(boolean requeue)
throws java.io.IOException
basicRecover in interface Channelrequeue - If true, messages will be requeued and possibly
delivered to a different consumer. If false, messages will be
redelivered to the same consumer.
java.io.IOException
public void basicRecoverAsync(boolean requeue)
throws java.io.IOException
basicRecoverAsync in interface Channelrequeue - If true, messages will be requeued and possibly
delivered to a different consumer. If false, messages will be
redelivered to the same consumer.
java.io.IOException
public AMQImpl.Tx.SelectOk txSelect()
throws java.io.IOException
txSelect in interface Channeljava.io.IOException - if an error is encounteredAMQP.Tx.Select,
AMQP.Tx.SelectOk
public AMQImpl.Tx.CommitOk txCommit()
throws java.io.IOException
txCommit in interface Channeljava.io.IOException - if an error is encounteredAMQP.Tx.Commit,
AMQP.Tx.CommitOk
public AMQImpl.Tx.RollbackOk txRollback()
throws java.io.IOException
txRollback in interface Channeljava.io.IOException - if an error is encounteredAMQP.Tx.Rollback,
AMQP.Tx.RollbackOk
public AMQImpl.Confirm.SelectOk confirmSelect()
throws java.io.IOException
confirmSelect in interface Channeljava.io.IOException - if an error is encounteredAMQP.Confirm.Select
public AMQImpl.Channel.FlowOk flow(boolean a)
throws java.io.IOException
flow in interface Channela - if true, the server is asked to start sending. If false, the server is asked to stop sending.
java.io.IOExceptionpublic AMQImpl.Channel.FlowOk getFlow()
getFlow in interface Channelpublic long getNextPublishSeqNo()
getNextPublishSeqNo in interface Channel
public void asyncRpc(Method method)
throws java.io.IOException
Channel
asyncRpc in interface Channelmethod - method to transmit over this channel.
java.io.IOException - Problem transmitting method.
public AMQCommand rpc(Method method)
throws java.io.IOException
AMQChannelMethod to the broker and waits for the
next in-bound Command from the broker: only for use from
non-connection-MainLoop threads!
rpc in interface Channelrpc in class AMQChannelmethod - method to transmit over this channel.
java.io.IOException - Problem transmitting method.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||