public class MessageInfo extends ApiResponse<MessageInfo>
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(io.nats.client.support.Status status,
java.lang.String streamName)
Create a Message Info
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getData()
Get the message data
|
@Nullable 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
|
@Nullable io.nats.client.support.Status |
getStatus()
Get the Status object.
|
@Nullable java.lang.String |
getStream()
Get the name of the stream.
|
@Nullable java.lang.String |
getSubject()
Get the message subject
|
@Nullable 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, 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(io.nats.client.support.Status status,
java.lang.String streamName)
status - the statusstreamName - the stream name if knownpublic @Nullable java.lang.String getSubject()
public long getSeq()
public byte[] getData()
public @Nullable java.time.ZonedDateTime getTime()
public @Nullable io.nats.client.impl.Headers getHeaders()
public @Nullable java.lang.String getStream()
public long getLastSeq()
public long getNumPending()
public @Nullable io.nats.client.support.Status getStatus()
public boolean isMessage()
public boolean isStatus()
public boolean isEobStatus()
public boolean isErrorStatus()
public java.lang.String toString()
toString in class ApiResponse<MessageInfo>