Interface Adapter<T extends org.eclipse.ditto.model.base.json.Jsonifiable<?>>

    • Method Detail

      • fromAdaptable

        T fromAdaptable​(Adaptable adaptable)
        Maps the given adaptable to its corresponding T.
        Parameters:
        adaptable - the adaptable to map.
        Returns:
        the mapped object.
        Throws:
        NullPointerException - if adaptable is null.
      • toAdaptable

        default Adaptable toAdaptable​(T t)
        Maps the given t to it's corresponding Adaptable using the Twin channel.
        Parameters:
        t - the object to map.
        Returns:
        the mapped adaptable.
        Throws:
        NullPointerException - if t is null.
      • getGroups

        Set<TopicPath.Group> getGroups()
        Retrieve the set of groups supported by this adapter.
        Returns:
        the supported groups.
      • getChannels

        Set<TopicPath.Channel> getChannels()
        Retrieve the set of channels supported by this adapter.
        Returns:
        the supported channels.
      • getCriteria

        Set<TopicPath.Criterion> getCriteria()
        Retrieve the set of criteria supported by this adapter.
        Returns:
        the supported criteria.
      • getActions

        Set<TopicPath.Action> getActions()
        Retrieve the set of actions supported by this adapter.
        Returns:
        the set of actions.
      • getSearchActions

        default Set<TopicPath.SearchAction> getSearchActions()
        Return the set of search actions supported by this adapter. It is the empty set by default.
        Returns:
        the collection of supported search actions.
      • isForResponses

        boolean isForResponses()
        Retrieve whether this adapter is for responses.
        Returns:
        whether this adapter is for responses.
      • requiresSubject

        default boolean requiresSubject()
        Retrieve whether this adapter requires a subject in the topic. Only relevant for message commands and responses and acknowledgements.
        Returns:
        whether a subject in the topic is required.