Class 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 a StreamingType was either subscribed to (subscribed is true) or unsubscribed from (subscribed is false).
    • 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
      boolean equals​(Object o)  
      static StreamingAck fromJson​(org.eclipse.ditto.json.JsonObject jsonObject, org.eclipse.ditto.model.base.headers.DittoHeaders dittoHeaders)
      Creates a new StreamingAck message from a JSON object.
      org.eclipse.ditto.services.utils.pubsub.StreamingType getStreamingType()  
      int hashCode()  
      boolean isSubscribed()  
      org.eclipse.ditto.json.JsonObject toJson()  
      org.eclipse.ditto.json.JsonObject toJson​(org.eclipse.ditto.model.base.json.JsonSchemaVersion schemaVersion, Predicate<org.eclipse.ditto.json.JsonField> thePredicate)  
      String toString()  
      • Methods inherited from interface org.eclipse.ditto.model.base.json.Jsonifiable

        getImplementedSchemaVersion, getLatestSchemaVersion, getSupportedSchemaVersions, implementsSchemaVersion, implementsSchemaVersion, toJsonString
      • Methods inherited from interface org.eclipse.ditto.model.base.json.Jsonifiable.WithPredicate

        toJson, toJsonString, toJsonString
    • 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 (subscribed is true) or removed (subscribed is false).
    • 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 (subscribed is true) or removed (subscribed is false).
      • fromJson

        public static StreamingAck fromJson​(org.eclipse.ditto.json.JsonObject jsonObject,
                                            org.eclipse.ditto.model.base.headers.DittoHeaders dittoHeaders)
        Creates a new StreamingAck message 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 is null.
        org.eclipse.ditto.json.JsonParseException - if the passed in jsonObject was not in the expected format.
      • toJson

        @Nonnull
        public org.eclipse.ditto.json.JsonObject toJson()
        Specified by:
        toJson in interface org.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:
        toJson in interface org.eclipse.ditto.model.base.json.Jsonifiable.WithPredicate<org.eclipse.ditto.json.JsonObject,​org.eclipse.ditto.json.JsonField>
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object