|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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 |
handleCancel(java.lang.String consumerTag)
No-op implementation of Consumer.handleCancel(String) |
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 |
handleRecoverOk(java.lang.String consumerTag)
No-op implementation of Consumer.handleRecoverOk(java.lang.String) . |
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 to which this consumer is attachedMethod Detail |
---|
public void handleConsumeOk(java.lang.String consumerTag)
handleConsumeOk
in interface Consumer
consumerTag
- the consumer tag associated with the consumerConsumer.handleConsumeOk(java.lang.String)
public void handleCancelOk(java.lang.String consumerTag)
Consumer.handleCancelOk(java.lang.String)
.
handleCancelOk
in interface Consumer
consumerTag
- the defined consumer tag (client- or server-generated)public void handleCancel(java.lang.String consumerTag) throws java.io.IOException
Consumer.handleCancel(String)
handleCancel
in interface Consumer
consumerTag
- the defined consumer tag (client- or server-generated)
java.io.IOException
public void handleShutdownSignal(java.lang.String consumerTag, ShutdownSignalException sig)
Consumer.handleShutdownSignal(java.lang.String, com.rabbitmq.client.ShutdownSignalException)
.
handleShutdownSignal
in interface Consumer
consumerTag
- the consumer tag associated with the consumersig
- a ShutdownSignalException
indicating the reason for the shut downpublic void handleRecoverOk(java.lang.String consumerTag)
Consumer.handleRecoverOk(java.lang.String)
.
handleRecoverOk
in interface Consumer
consumerTag
- the consumer tag associated with the consumerpublic 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 Consumer
consumerTag
- the consumer tag associated with the consumerenvelope
- 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 encounters an I/O error while processing the messageEnvelope
public Channel getChannel()
public java.lang.String getConsumerTag()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |