Class StreamingSession


  • public final class StreamingSession
    extends Object
    Store of the needed information about a streaming session of a single streaming type.
    • Method Detail

      • getNamespaces

        public List<String> getNamespaces()
        Returns:
        namespaces of the session.
      • getExtraFields

        public Optional<org.eclipse.ditto.json.JsonFieldSelector> getExtraFields()
        Returns:
        extra fields of the session if any is given.
      • mergeThingWithExtra

        public org.eclipse.ditto.model.things.Thing mergeThingWithExtra​(org.eclipse.ditto.signals.base.Signal<?> signal,
                                                                        org.eclipse.ditto.json.JsonObject extra)
        Merge any thing information in a signal event together with extra fields from signal enrichment. Thing events contain thing information. All other signals do not contain thing information.
        Parameters:
        signal - the signal.
        extra - extra fields from signal enrichment.
        Returns:
        the merged thing if thing information exists in any of the 2 sources, or an empty thing otherwise.
      • matchesFilter

        public boolean matchesFilter​(org.eclipse.ditto.model.things.Thing thing)
        Test whether a thing matches the filter defined in this session.
        Parameters:
        thing - the thing.
        Returns:
        whether the thing passes the filter.