java.lang.Object
com.hedera.hashgraph.sdk.TopicMessage
Topic message records.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal TopicMessageChunk[]Array of topic message chunks.final InstantThe consensus timestamp of the message in seconds.nanosecondsfinal byte[]The content of the messagefinal byte[]The new running hash of the topic that received the messagefinal longThe sequence number of the message relative to all other messages for the same topicfinal TransactionIdThe transaction id -
Constructor Summary
ConstructorsConstructorDescriptionTopicMessage(Instant lastConsensusTimestamp, byte[] message, byte[] lastRunningHash, long lastSequenceNumber, TopicMessageChunk[] chunks, TransactionId transactionId) Constructor. -
Method Summary
Modifier and TypeMethodDescription(package private) static TopicMessageofMany(List<ConsensusTopicResponse> responses) Create a new topic message from a list of response's protobuf.(package private) static TopicMessageofSingle(ConsensusTopicResponse response) Create a new topic message from a response protobuf.toString()
-
Field Details
-
consensusTimestamp
The consensus timestamp of the message in seconds.nanoseconds -
contents
public final byte[] contentsThe content of the message -
runningHash
public final byte[] runningHashThe new running hash of the topic that received the message -
sequenceNumber
public final long sequenceNumberThe sequence number of the message relative to all other messages for the same topic -
chunks
Array of topic message chunks. -
transactionId
The transaction id
-
-
Constructor Details
-
TopicMessage
TopicMessage(Instant lastConsensusTimestamp, byte[] message, byte[] lastRunningHash, long lastSequenceNumber, @Nullable TopicMessageChunk[] chunks, @Nullable TransactionId transactionId) Constructor.- Parameters:
lastConsensusTimestamp- the last consensus timemessage- the messagelastRunningHash- the last running hashlastSequenceNumber- the last sequence numberchunks- the array of chunkstransactionId- the transaction id
-
-
Method Details
-
ofSingle
Create a new topic message from a response protobuf.- Parameters:
response- the protobuf response- Returns:
- the new topic message
-
ofMany
Create a new topic message from a list of response's protobuf.- Parameters:
responses- the protobuf response- Returns:
- the new topic message
-
toString
-