public class MessageInfo extends ApiResponse<MessageInfo>
json, NO_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 fromDirect)
Create a Message Info
This signature is public for testing purposes and is not intended to be used externally.
|
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 |
getSeq()
Get the message sequence
|
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
|
java.lang.String |
toString() |
getApiErrorCode, getDescription, getError, getErrorCode, getErrorObject, getType, hasError, throwOnHasError
@Deprecated public MessageInfo(Message msg)
msg
- the messagepublic MessageInfo(Message msg, java.lang.String streamName, boolean fromDirect)
msg
- the messagestreamName
- the stream name if knownfromDirect
- true if the object is being created from a get direct api call instead of the standard get messagepublic 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 java.lang.String toString()
toString
in class java.lang.Object