Class StreamingSession
- java.lang.Object
-
- org.eclipse.ditto.services.gateway.streaming.actors.StreamingSession
-
public final class StreamingSession extends Object
Store of the needed information about a streaming session of a single streaming type.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<org.eclipse.ditto.json.JsonFieldSelector>getExtraFields()List<String>getNamespaces()akka.actor.ActorRefgetStreamingSessionActor()booleanmatchesFilter(org.eclipse.ditto.model.things.Thing thing)Test whether a thing matches the filter defined in this session.org.eclipse.ditto.model.things.ThingmergeThingWithExtra(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.
-
-
-
Method Detail
-
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.
-
getStreamingSessionActor
public akka.actor.ActorRef getStreamingSessionActor()
-
-