Package io.ably.lib.liveobjects.message
Interface ObjectOperation
public interface ObjectOperation
The user-facing representation of an operation applied to an object on a channel. It
is exposed as the
operation attribute of an
ObjectMessage.
Exactly one of the payload accessors (getMapCreate(),
getMapSet(), getMapRemove(), getCounterCreate(),
getCounterInc(), getObjectDelete(), getMapClear()) returns
a non-null value, corresponding to the action of the operation.
Note that, unlike the wire-level operation representation, this type does not carry
the outbound-only mapCreateWithObjectId / counterCreateWithObjectId
variants: those are resolved back to their derived MapCreate /
CounterCreate forms before being surfaced to users.
Spec: PAOOP1, PAOOP2
-
Method Summary
Modifier and TypeMethodDescription@NotNull ObjectOperationActionReturns the action of this operation, defining what was applied to the object.@Nullable CounterCreateReturns the payload of aObjectOperationAction.COUNTER_CREATEoperation.@Nullable CounterIncReturns the payload of aObjectOperationAction.COUNTER_INCoperation.@Nullable MapClearReturns the payload of aObjectOperationAction.MAP_CLEARoperation.@Nullable MapCreateReturns the payload of aObjectOperationAction.MAP_CREATEoperation.@Nullable MapRemoveReturns the payload of aObjectOperationAction.MAP_REMOVEoperation.@Nullable MapSetReturns the payload of aObjectOperationAction.MAP_SEToperation.@Nullable ObjectDeleteReturns the payload of anObjectOperationAction.OBJECT_DELETEoperation.@NotNull StringReturns the object id of the object on the channel to which this operation was applied.
-
Method Details
-
getAction
Returns the action of this operation, defining what was applied to the object.Spec: PAOOP2a / OOP3a
- Returns:
- the operation action
-
getObjectId
Returns the object id of the object on the channel to which this operation was applied.Spec: PAOOP2b / OOP3b
- Returns:
- the target object id
-
getMapCreate
Returns the payload of aObjectOperationAction.MAP_CREATEoperation.Spec: PAOOP2c / OOP3j
- Returns:
- the map-create payload, or
nullif not applicable
-
getMapSet
Returns the payload of aObjectOperationAction.MAP_SEToperation.Spec: PAOOP2d / OOP3k
- Returns:
- the map-set payload, or
nullif not applicable
-
getMapRemove
Returns the payload of aObjectOperationAction.MAP_REMOVEoperation.Spec: PAOOP2e / OOP3l
- Returns:
- the map-remove payload, or
nullif not applicable
-
getCounterCreate
Returns the payload of aObjectOperationAction.COUNTER_CREATEoperation.Spec: PAOOP2f / OOP3m
- Returns:
- the counter-create payload, or
nullif not applicable
-
getCounterInc
Returns the payload of aObjectOperationAction.COUNTER_INCoperation.Spec: PAOOP2g / OOP3n
- Returns:
- the counter-increment payload, or
nullif not applicable
-
getObjectDelete
Returns the payload of anObjectOperationAction.OBJECT_DELETEoperation.Spec: PAOOP2h / OOP3o
- Returns:
- the object-delete payload, or
nullif not applicable
-
getMapClear
Returns the payload of aObjectOperationAction.MAP_CLEARoperation.Spec: PAOOP2i / OOP3r
- Returns:
- the map-clear payload, or
nullif not applicable
-