Constructor and Description |
---|
DefaultConsumer(Channel channel)
Constructs a new instance and records its association to the passed-in channel.
|
Modifier and Type | Method and Description |
---|---|
Channel |
getChannel()
Retrieve the channel.
|
String |
getConsumerTag()
Retrieve the consumer tag.
|
void |
handleCancel(String consumerTag)
No-op implementation of
Consumer.handleCancel(String) |
void |
handleCancelOk(String consumerTag)
No-op implementation of
Consumer.handleCancelOk(java.lang.String) . |
void |
handleConsumeOk(String consumerTag)
Stores the most recently passed-in consumerTag - semantically, there should be only one.
|
void |
handleDelivery(String consumerTag,
Envelope envelope,
AMQP.BasicProperties properties,
byte[] body)
|
void |
handleRecoverOk(String consumerTag)
No-op implementation of
Consumer.handleRecoverOk(java.lang.String) . |
void |
handleShutdownSignal(String consumerTag,
ShutdownSignalException sig)
No-op implementation of
Consumer.handleShutdownSignal(java.lang.String, com.rabbitmq.client.ShutdownSignalException) . |
public DefaultConsumer(Channel channel)
channel
- the channel to which this consumer is attachedpublic void handleConsumeOk(String consumerTag)
handleConsumeOk
in interface Consumer
consumerTag
- the consumer tag associated with the consumerConsumer.handleConsumeOk(java.lang.String)
public void handleCancelOk(String consumerTag)
Consumer.handleCancelOk(java.lang.String)
.handleCancelOk
in interface Consumer
consumerTag
- the defined consumer tag (client- or server-generated)public void handleCancel(String consumerTag) throws IOException
Consumer.handleCancel(String)
handleCancel
in interface Consumer
consumerTag
- the defined consumer tag (client- or server-generated)IOException
public void handleShutdownSignal(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(String consumerTag)
Consumer.handleRecoverOk(java.lang.String)
.handleRecoverOk
in interface Consumer
consumerTag
- the consumer tag associated with the consumerpublic void handleDelivery(String consumerTag, Envelope envelope, AMQP.BasicProperties properties, byte[] body) throws 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)IOException
- if the consumer encounters an I/O error while processing the messageEnvelope
public Channel getChannel()
public String getConsumerTag()
Copyright © 2022 VMware, Inc. or its affiliates.. All rights reserved.