Class Message
- All Implemented Interfaces:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Messagedeserialize(ByteBuffer buffer) Deserializes an instance of this object from a byte payload.Reads a named field.byte[]Gets the message field.Gets the messageType field.protected voidserializeInto(Writer buffer) Writes this object's fields into the supplied buffer.voidSets a named field.voidsetMessage(byte[] value) Sets the message field.voidsetMessageType(MessageType value) Sets the messageType field.intsize()Calculates the size of the object.toJson()Converts this object to a JSON-serializable representation.toString()Returns a string representation of this object.Returns the type-hint map driving the rule-based descriptor pipeline.Methods inherited from class org.symbol.sdk.CatbufferType
asByteArray, asBytes, asInt, asList, asLong, serialize, sort, toJsonString
-
Field Details
-
TYPE_HINTS
-
-
Constructor Details
-
Message
public Message()Creates a new Message.
-
-
Method Details
-
typeHints
- Message.typeHints
Returns the type-hint map driving the rule-based descriptor pipeline.
- Overrides:
typeHintsin classCatbufferType- Returns:
Field-name → rule-key map.
-
setField
- Message.setField
Sets a named field. Used by the rule-based descriptor pipeline.
- Overrides:
setFieldin classCatbufferType- Parameters:
name- Field name (descriptor key).value- Value to assign.
-
getField
- Message.getField
Reads a named field. Used by the facade-level entity inspection helpers.
- Overrides:
getFieldin classCatbufferType- Parameters:
name- Field name.- Returns:
Field value.
-
getMessageType
- Message.getMessageType
Gets the messageType field.
- Returns:
The messageType field.
-
setMessageType
- Message.setMessageType
Sets the messageType field.
- Parameters:
value- New messageType value.
-
getMessage
public byte[] getMessage()- Message.getMessage
Gets the message field.
- Returns:
The message field.
-
setMessage
public void setMessage(byte[] value) - Message.setMessage
Sets the message field.
- Parameters:
value- New message value.
-
size
public int size()- Message.size
Calculates the size of the object.
- Returns:
Size of this object in bytes.
-
deserialize
- Message.deserialize
Deserializes an instance of this object from a byte payload.
- Parameters:
buffer- Output writer.- Returns:
Deserialized object.
- Throws:
IndexOutOfBoundsException- if the buffer is truncated or a declared length overruns itIllegalArgumentException- if a field carries an invalid value (e.g. a reserved field or unknown discriminator)
-
serializeInto
- Message.serializeInto
Writes this object's fields into the supplied buffer.
- Specified by:
serializeIntoin classCatbufferType- Parameters:
buffer- Output writer.
-
toString
- Message.toString
Returns a string representation of this object.
-
toJson
- Message.toJson
Converts this object to a JSON-serializable representation.
- Specified by:
toJsonin classCatbufferType- Returns:
JSON-serializable representation of this object.
-