public class MessageInfo extends ApiResponse<MessageInfo>
jv, NO_TYPE, PARSE_ERROR_TYPE| Constructor and Description |
|---|
MessageInfo(Message msg)
Deprecated.
This signature was public for unit testing but is no longer used.
|
MessageInfo(Message msg,
java.lang.String streamName,
boolean parseDirect)
Create a Message Info
|
MessageInfo(Status status,
java.lang.String streamName)
Create a Message Info
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getData()
Get the message data
|
io.nats.client.impl.Headers |
getHeaders()
Get the headers
|
long |
getLastSeq()
Get the sequence number of the last message in the stream.
|
long |
getNumPending()
Amount of pending messages that can be requested with a subsequent batch request.
|
long |
getSeq()
Get the message sequence
|
Status |
getStatus()
Get the Status object.
|
java.lang.String |
getStream()
Get the name of the stream.
|
java.lang.String |
getSubject()
Get the message subject
|
java.time.ZonedDateTime |
getTime()
Get the time the message was received
|
boolean |
isEobStatus()
Whether this MessageInfo is a status message and is a direct EOB status
|
boolean |
isErrorStatus()
Whether this MessageInfo is a status message and is an error status
|
boolean |
isMessage()
Whether this MessageInfo is a regular message
|
boolean |
isStatus()
Whether this MessageInfo is a status message
|
java.lang.String |
toString() |
getApiErrorCode, getDescription, getError, getErrorCode, getErrorObject, getJv, getType, hasError, parseMessage, throwOnHasError@Deprecated public MessageInfo(Message msg)
msg - the messagepublic MessageInfo(Message msg, java.lang.String streamName, boolean parseDirect)
msg - the messagestreamName - the stream name if knownparseDirect - true if the object is being created from a direct api call instead of get messagepublic MessageInfo(Status status, java.lang.String streamName)
status - the statusstreamName - the stream name if knownpublic java.lang.String getSubject()
public long getSeq()
public byte[] getData()
public java.time.ZonedDateTime getTime()
public io.nats.client.impl.Headers getHeaders()
public java.lang.String getStream()
public long getLastSeq()
public long getNumPending()
public Status getStatus()
public boolean isMessage()
public boolean isStatus()
public boolean isEobStatus()
public boolean isErrorStatus()
public java.lang.String toString()
toString in class ApiResponse<MessageInfo>