Package io.ably.lib.types
Class Annotation
java.lang.Object
io.ably.lib.types.BaseMessage
io.ably.lib.types.Annotation
- All Implemented Interfaces:
Cloneable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
-
Field Summary
FieldsModifier and TypeFieldDescription(TAN2b) The action, whether this is an annotation being added or removed, one of the AnnotationAction enum values.(TAN2e) An optional count, only relevant to certain aggregation methods, see aggregation methods documentation for more info.(TAN2l) A JSON object for metadata and/or ancillary payloads.(TAN2j) The serial of the message (of type `MESSAGE_CREATE`) that this annotation is annotating.(TAN2d) The name of this annotation.(TAN2i) This annotation's unique serial (lexicographically totally ordered).(TAN2k) The type of annotation it is, typically some identifier together with an aggregation method; for example: "emoji:distinct.v1".Fields inherited from class io.ably.lib.types.BaseMessage
clientId, connectionId, data, encoding, id, timestamp
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Annotation
fromMsgpack
(org.msgpack.core.MessageUnpacker unpacker) protected void
read
(com.google.gson.JsonObject map) Populate fields from JSON.Methods inherited from class io.ably.lib.types.BaseMessage
countFields, decode, decode, encode, getDetails, readInt, readLong, readString, toJsonObject
-
Field Details
-
action
(TAN2b) The action, whether this is an annotation being added or removed, one of the AnnotationAction enum values. -
serial
(TAN2i) This annotation's unique serial (lexicographically totally ordered). -
messageSerial
(TAN2j) The serial of the message (of type `MESSAGE_CREATE`) that this annotation is annotating. -
type
(TAN2k) The type of annotation it is, typically some identifier together with an aggregation method; for example: "emoji:distinct.v1". Handled opaquely by the SDK and validated serverside. | -
name
(TAN2d) The name of this annotation. This is the field that most annotation aggregations will operate on. For example, using "distinct.v1" aggregation (specified in the type), the message summary will show a list of clients who have published an annotation with each distinct annotation.name. -
count
(TAN2e) An optional count, only relevant to certain aggregation methods, see aggregation methods documentation for more info. -
extras
(TAN2l) A JSON object for metadata and/or ancillary payloads.
-
-
Constructor Details
-
Annotation
public Annotation()
-
-
Method Details
-
fromMsgpack
- Throws:
IOException
-
read
Description copied from class:BaseMessage
Populate fields from JSON.- Overrides:
-
read
in classBaseMessage
- Throws:
MessageDecodeException
-