Package com.casper.sdk.model.key
Class MessageKey
- java.lang.Object
-
- com.casper.sdk.model.key.AbstractSerializedKeyTaggedHex<KeyTag>
-
- com.casper.sdk.model.key.Key
-
- com.casper.sdk.model.key.MessageKey
-
- All Implemented Interfaces:
CasperSerializableObject,SerializableObject
public class MessageKey extends Key
A `Key` under which a message is stored.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringTOPIC
-
Constructor Summary
Constructors Constructor Description MessageKey()MessageKey(EntityAddr entityAddr, Digest entityAddrHash, java.lang.Long messageIndex, Digest topicHash)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddeserializeCustom(DeserializerBuffer deser)protected voidfromStringCustom(java.lang.String strKey)EntityAddrgetEntityAddr()The entity addr.DigestgetEntityAddrHash()The hash of the entity address.java.util.Optional<java.lang.Long>getMessageIndex()DigestgetTopicHash()The hash of the name of the message topic.voidsetEntityAddr(EntityAddr entityAddr)The entity addr.voidsetEntityAddrHash(Digest entityAddrHash)The hash of the entity address.voidsetMessageIndex(java.lang.Long messageIndex)The optional message index.voidsetTopicHash(Digest topicHash)The hash of the name of the message topic.java.lang.StringtoString()-
Methods inherited from class com.casper.sdk.model.key.Key
canEqual, create, deserialize, equals, fromTaggedHexString, generateAccountHash, hashCode
-
Methods inherited from class com.casper.sdk.model.key.AbstractSerializedKeyTaggedHex
getAlgoTaggedHex, getKey, getTag, serialize, setKey, setTag
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.casper.sdk.model.clvalue.serde.CasperSerializableObject
serialize
-
-
-
-
Field Detail
-
TOPIC
public static final java.lang.String TOPIC
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MessageKey
public MessageKey(EntityAddr entityAddr, Digest entityAddrHash, java.lang.Long messageIndex, Digest topicHash)
-
MessageKey
public MessageKey()
-
-
Method Detail
-
deserializeCustom
protected void deserializeCustom(DeserializerBuffer deser) throws java.lang.Exception
- Overrides:
deserializeCustomin classKey- Throws:
java.lang.Exception
-
getMessageIndex
public java.util.Optional<java.lang.Long> getMessageIndex()
-
fromStringCustom
protected void fromStringCustom(java.lang.String strKey)
- Overrides:
fromStringCustomin classKey
-
getEntityAddr
public EntityAddr getEntityAddr()
The entity addr.
-
getEntityAddrHash
public Digest getEntityAddrHash()
The hash of the entity address.
-
getTopicHash
public Digest getTopicHash()
The hash of the name of the message topic.
-
setEntityAddr
public void setEntityAddr(EntityAddr entityAddr)
The entity addr.
-
setEntityAddrHash
public void setEntityAddrHash(Digest entityAddrHash)
The hash of the entity address.
-
setMessageIndex
public void setMessageIndex(java.lang.Long messageIndex)
The optional message index.
-
setTopicHash
public void setTopicHash(Digest topicHash)
The hash of the name of the message topic.
-
-