Interface SubjectAnnouncement

  • All Superinterfaces:
    org.eclipse.ditto.model.base.json.Jsonifiable<org.eclipse.ditto.json.JsonObject>

    @Immutable
    public interface SubjectAnnouncement
    extends org.eclipse.ditto.model.base.json.Jsonifiable<org.eclipse.ditto.json.JsonObject>
    Represents announcement settings of a Subject.
    Since:
    2.0.0
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static class  SubjectAnnouncement.JsonFields
      Fields of the JSON representation of a SubjectAnnouncement object.
      • 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>
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      static SubjectAnnouncement fromJson​(org.eclipse.ditto.json.JsonObject jsonObject)
      Returns a new SubjectAnnouncement with the configuration given in the JSON object.
      Optional<org.eclipse.ditto.model.base.common.DittoDuration> getBeforeExpiry()
      Returns the duration before expiry when an announcement should be sent, or an empty optional if no announcement should be sent before expiry.
      boolean isWhenDeleted()
      Returns whether an announcement should be sent when the subject is deleted.
      static SubjectAnnouncement of​(org.eclipse.ditto.model.base.common.DittoDuration beforeExpiry, boolean whenDeleted)
      Returns a new SubjectAnnouncement with the given configuration.
      • Methods inherited from interface org.eclipse.ditto.model.base.json.Jsonifiable

        getImplementedSchemaVersion, getLatestSchemaVersion, getSupportedSchemaVersions, implementsSchemaVersion, implementsSchemaVersion, toJson, toJsonString
    • Method Detail

      • of

        static SubjectAnnouncement of​(@Nullable
                                      org.eclipse.ditto.model.base.common.DittoDuration beforeExpiry,
                                      boolean whenDeleted)
        Returns a new SubjectAnnouncement with the given configuration.
        Parameters:
        beforeExpiry - duration before expiry when an announcement should be sent, or null if no announcement should be sent.
        whenDeleted - whether an announcement should be sent when the subject is deleted.
        Returns:
        the new SubjectAnnouncement.
      • getBeforeExpiry

        Optional<org.eclipse.ditto.model.base.common.DittoDuration> getBeforeExpiry()
        Returns the duration before expiry when an announcement should be sent, or an empty optional if no announcement should be sent before expiry.
        Returns:
        duration of the optional announcement window.
      • isWhenDeleted

        boolean isWhenDeleted()
        Returns whether an announcement should be sent when the subject is deleted.
        Returns:
        whether the expiry is expired or not.