public class GetResponse extends Object
Channel.basicGet(java.lang.String, boolean)
message-retrieval method call
- essentially a static bean "holder" with message response data.Constructor and Description |
---|
GetResponse(Envelope envelope,
AMQP.BasicProperties props,
byte[] body,
int messageCount)
Construct a
GetResponse with the specified construction parameters |
Modifier and Type | Method and Description |
---|---|
byte[] |
getBody()
Get the message body included in this response
|
Envelope |
getEnvelope()
Get the
Envelope included in this response |
int |
getMessageCount()
Get the server's most recent estimate of the number of messages
remaining on the queue.
|
AMQP.BasicProperties |
getProps()
Get the
BasicProperties included in this response |
String |
toString() |
public GetResponse(Envelope envelope, AMQP.BasicProperties props, byte[] body, int messageCount)
GetResponse
with the specified construction parametersenvelope
- the Envelope
props
- message propertiesbody
- the message bodymessageCount
- the server's most recent estimate of the number of messages remaining on the queuepublic Envelope getEnvelope()
Envelope
included in this responsepublic AMQP.BasicProperties getProps()
BasicProperties
included in this responsepublic byte[] getBody()
public int getMessageCount()
According to the AMQP specification, this figure does not include the message being delivered. For example, this field will be zero in the simplest case of a single reader issuing a Basic.Get on a private queue holding a single message (the message being delivered in this GetResponse).
Copyright © 2022 VMware, Inc. or its affiliates.. All rights reserved.