|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.rabbitmq.client.DefaultConsumer
public class DefaultConsumer
Convenience class providing a default implementation of Consumer.
We anticipate that most Consumer implementations will subclass this class.
| Constructor Summary | |
|---|---|
DefaultConsumer(Channel channel)
Constructs a new instance and records its association to the passed-in channel. |
|
| Method Summary | |
|---|---|
Channel |
getChannel()
Retrieve the channel. |
java.lang.String |
getConsumerTag()
Retrieve the consumer tag. |
void |
handleCancelOk(java.lang.String consumerTag)
No-op implementation of Consumer.handleCancelOk(java.lang.String). |
void |
handleConsumeOk(java.lang.String consumerTag)
Stores the most recently passed-in consumerTag - semantically, there should be only one. |
void |
handleDelivery(java.lang.String consumerTag,
Envelope envelope,
AMQP.BasicProperties properties,
byte[] body)
No-op implementation of Consumer.handleDelivery(java.lang.String, com.rabbitmq.client.Envelope, com.rabbitmq.client.AMQP.BasicProperties, byte[]). |
void |
handleShutdownSignal(java.lang.String consumerTag,
ShutdownSignalException sig)
No-op implementation of Consumer.handleShutdownSignal(java.lang.String, com.rabbitmq.client.ShutdownSignalException). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultConsumer(Channel channel)
channel - the channel on which the| Method Detail |
|---|
public void handleConsumeOk(java.lang.String consumerTag)
handleConsumeOk in interface ConsumerconsumerTag - the defined consumerTag (either client- or server-generated)Consumer.handleConsumeOk(java.lang.String)public void handleCancelOk(java.lang.String consumerTag)
Consumer.handleCancelOk(java.lang.String).
handleCancelOk in interface ConsumerconsumerTag - the defined consumer tag (client- or server-generated)
public void handleShutdownSignal(java.lang.String consumerTag,
ShutdownSignalException sig)
Consumer.handleShutdownSignal(java.lang.String, com.rabbitmq.client.ShutdownSignalException).
handleShutdownSignal in interface ConsumerconsumerTag - the defined consumerTag (either client- or server-generated)sig - an exception object encapsulating the reason for shutdown
public void handleDelivery(java.lang.String consumerTag,
Envelope envelope,
AMQP.BasicProperties properties,
byte[] body)
throws java.io.IOException
Consumer.handleDelivery(java.lang.String, com.rabbitmq.client.Envelope, com.rabbitmq.client.AMQP.BasicProperties, byte[]).
handleDelivery in interface ConsumerconsumerTag - the defined consumerTag (either client- or server-generated)envelope - packaging data for the messageproperties - content header data for the messagebody - the message body (opaque client-specific byte array)
java.io.IOException - if the consumer hits an I/O error while processing the messagepublic Channel getChannel()
public java.lang.String getConsumerTag()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||