public Envelope extends Metoid
The message is a pack that can include two principal parts:
Modifier and Type | Field and Description |
---|---|
java.lang.String |
DATA_LENGTH_KEY |
java.lang.String |
META_LENGTH_KEY |
java.lang.String |
META_TYPE_KEY |
java.lang.String |
TYPE_KEY
Property keys
|
Modifier and Type | Method and Description |
---|---|
Binary |
getData()
Read data into buffer. This operation could take a lot of time so be careful when performing it synchronously
|
java.util.Optional<java.lang.String> |
getDataType()
The type of data encoding
|
java.lang.String |
getDescription()
Textual user friendly description
|
Meta |
getMeta()
Meta part of the envelope
|
java.util.Optional<java.time.Instant> |
getTime()
Time of creation of the envelope
|
java.util.Optional<java.lang.String> |
getType()
The purpose of the envelope
|
boolean |
hasData() |
boolean |
hasMeta() |
<T> Data<T> |
map()
Transform Envelope to Lazy data using given transformation. In case transformation failed an exception will be thrown in call site.
|
java.lang.String TYPE_KEY
Property keys
java.lang.String META_TYPE_KEY
java.lang.String META_LENGTH_KEY
java.lang.String DATA_LENGTH_KEY
Meta getMeta()
Meta part of the envelope
Binary getData()
Read data into buffer. This operation could take a lot of time so be careful when performing it synchronously
boolean hasMeta()
boolean hasData()
java.util.Optional<java.lang.String> getType()
The purpose of the envelope
java.util.Optional<java.lang.String> getDataType()
The type of data encoding
java.lang.String getDescription()
Textual user friendly description
java.util.Optional<java.time.Instant> getTime()
Time of creation of the envelope
<T> Data<T> map()
Transform Envelope to Lazy data using given transformation. In case transformation failed an exception will be thrown in call site.