Class StreamingAck
- java.lang.Object
-
- org.eclipse.ditto.services.gateway.streaming.StreamingAck
-
- All Implemented Interfaces:
org.eclipse.ditto.model.base.json.Jsonifiable<org.eclipse.ditto.json.JsonObject>,org.eclipse.ditto.model.base.json.Jsonifiable.WithPredicate<org.eclipse.ditto.json.JsonObject,org.eclipse.ditto.json.JsonField>,StreamControlMessage
public final class StreamingAck extends Object implements org.eclipse.ditto.model.base.json.Jsonifiable.WithPredicate<org.eclipse.ditto.json.JsonObject,org.eclipse.ditto.json.JsonField>, StreamControlMessage
Send for acknowledging that a subscription in the cluster for aStreamingTypewas either subscribed to (subscribedistrue) or unsubscribed from (subscribedisfalse).
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.ditto.model.base.json.Jsonifiable
org.eclipse.ditto.model.base.json.Jsonifiable.WithFieldSelector, org.eclipse.ditto.model.base.json.Jsonifiable.WithFieldSelectorAndPredicate<T extends Object>, org.eclipse.ditto.model.base.json.Jsonifiable.WithPointer<J extends org.eclipse.ditto.json.JsonValue>, org.eclipse.ditto.model.base.json.Jsonifiable.WithPredicate<J extends org.eclipse.ditto.json.JsonValue,T extends Object>
-
-
Constructor Summary
Constructors Constructor Description StreamingAck(org.eclipse.ditto.services.utils.pubsub.StreamingType streamingType, boolean subscribed)Constructs a new acknowledge for when a subscription in the cluster was added/removed.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)static StreamingAckfromJson(org.eclipse.ditto.json.JsonObject jsonObject, org.eclipse.ditto.model.base.headers.DittoHeaders dittoHeaders)Creates a newStreamingAckmessage from a JSON object.org.eclipse.ditto.services.utils.pubsub.StreamingTypegetStreamingType()inthashCode()booleanisSubscribed()org.eclipse.ditto.json.JsonObjecttoJson()org.eclipse.ditto.json.JsonObjecttoJson(org.eclipse.ditto.model.base.json.JsonSchemaVersion schemaVersion, Predicate<org.eclipse.ditto.json.JsonField> thePredicate)StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Constructor Detail
-
StreamingAck
public StreamingAck(org.eclipse.ditto.services.utils.pubsub.StreamingType streamingType, boolean subscribed)Constructs a new acknowledge for when a subscription in the cluster was added/removed.- Parameters:
streamingType- the StreamingType of this StreamingAck message.subscribed- whether it is acknowledged if a subscription was added (subscribedistrue) or removed (subscribedisfalse).
-
-
Method Detail
-
getStreamingType
public org.eclipse.ditto.services.utils.pubsub.StreamingType getStreamingType()
- Returns:
- the StreamingType of this StreamingAck message.
-
isSubscribed
public boolean isSubscribed()
- Returns:
- whether it is acknowledged if a subscription was added (
subscribedistrue) or removed (subscribedisfalse).
-
fromJson
public static StreamingAck fromJson(org.eclipse.ditto.json.JsonObject jsonObject, org.eclipse.ditto.model.base.headers.DittoHeaders dittoHeaders)
Creates a newStreamingAckmessage from a JSON object.- Parameters:
jsonObject- the JSON object of which the StreamingAck is to be created.dittoHeaders- will be ignored- Returns:
- the StreamingAck message.
- Throws:
NullPointerException- if any argument isnull.org.eclipse.ditto.json.JsonParseException- if the passed injsonObjectwas not in the expected format.
-
toJson
@Nonnull public org.eclipse.ditto.json.JsonObject toJson()
- Specified by:
toJsonin interfaceorg.eclipse.ditto.model.base.json.Jsonifiable<org.eclipse.ditto.json.JsonObject>
-
toJson
@Nonnull public org.eclipse.ditto.json.JsonObject toJson(@Nonnull org.eclipse.ditto.model.base.json.JsonSchemaVersion schemaVersion, @Nonnull Predicate<org.eclipse.ditto.json.JsonField> thePredicate)- Specified by:
toJsonin interfaceorg.eclipse.ditto.model.base.json.Jsonifiable.WithPredicate<org.eclipse.ditto.json.JsonObject,org.eclipse.ditto.json.JsonField>
-
-