Interface Adaptable

  • All Superinterfaces:
    org.eclipse.ditto.model.base.headers.WithDittoHeaders<Adaptable>
    All Known Subinterfaces:
    JsonifiableAdaptable

    public interface Adaptable
    extends org.eclipse.ditto.model.base.headers.WithDittoHeaders<Adaptable>
    An Adaptable can be mapped to and from a Command, CommandResponse or Event.
    • Method Detail

      • newBuilder

        static AdaptableBuilder newBuilder​(TopicPath topicPath)
        Returns a mutable builder to create immutable Adaptable instances for a given topicPath.
        Parameters:
        topicPath - the topic path.
        Returns:
        the builder.
        Throws:
        NullPointerException - if topicPath is null.
      • getTopicPath

        TopicPath getTopicPath()
        Returns the TopicPath of this Adaptable.
        Returns:
        the topic path.
      • getPayload

        Payload getPayload()
        Returns the Payload of this Adaptable.
        Returns:
        the payload.
      • getHeaders

        Optional<org.eclipse.ditto.model.base.headers.DittoHeaders> getHeaders()
        Returns the DittoHeaders of this Adaptable if present.
        Returns:
        the optional headers.
      • containsHeaderForKey

        boolean containsHeaderForKey​(CharSequence key)
        Indicates whether this Adaptable contains a header with the specified key.
        Parameters:
        key - the key to be looked up.
        Returns:
        true if this Adaptable contains a header with key key.