Class SubscriptionActor

  • All Implemented Interfaces:
    akka.actor.Actor, akka.actor.Stash, akka.actor.StashSupport, akka.actor.Timers, akka.actor.UnrestrictedStash, akka.dispatch.RequiresMessageQueue<akka.dispatch.DequeBasedMessageQueueSemantics>

    public final class SubscriptionActor
    extends org.eclipse.ditto.services.utils.akka.actors.AbstractActorWithStashWithTimers
    Actor that translates subscription commands into stream operations and stream signals into subscription events.
    Since:
    1.1.0
    • Nested Class Summary

      • Nested classes/interfaces inherited from class akka.actor.AbstractActor

        akka.actor.AbstractActor.ActorContext, akka.actor.AbstractActor.Receive
      • Nested classes/interfaces inherited from interface akka.actor.Actor

        akka.actor.Actor.emptyBehavior$, akka.actor.Actor.ignoringBehavior$
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static org.reactivestreams.Subscriber<org.eclipse.ditto.json.JsonArray> asSubscriber​(akka.actor.ActorRef subscriptionActor)
      Wrap a subscription actor as a reactive stream subscriber.
      akka.actor.AbstractActor.Receive createReceive()  
      void postStop()  
      static akka.actor.Props props​(Duration idleTimeout, akka.actor.ActorRef sender, org.eclipse.ditto.model.base.headers.DittoHeaders dittoHeaders)
      Create Props object for the SubscriptionActor.
      • Methods inherited from class org.eclipse.ditto.services.utils.akka.actors.AbstractActorWithStashWithTimers

        akka$actor$StashSupport$_setter_$akka$actor$StashSupport$$capacity_$eq, akka$actor$StashSupport$_setter_$mailbox_$eq, akka$actor$StashSupport$$capacity, akka$actor$StashSupport$$theStash, akka$actor$StashSupport$$theStash_$eq, clearStash, mailbox, prepend, preRestart, stash, unstash, unstashAll, unstashAll
      • Methods inherited from class akka.actor.AbstractActorWithTimers

        akka$actor$Timers$_setter_$akka$actor$Timers$$_timers_$eq, akka$actor$Timers$$_timers, aroundPostStop, aroundPreRestart, aroundReceive, getTimers, timers
      • Methods inherited from class akka.actor.AbstractActor

        akka$actor$Actor$_setter_$context_$eq, akka$actor$Actor$_setter_$self_$eq, aroundPostRestart, aroundPreStart, context, emptyBehavior, getContext, getSelf, getSender, postRestart, preRestart, preStart, receive, receiveBuilder, self, sender, supervisorStrategy, unhandled
      • Methods inherited from interface akka.actor.Actor

        akka$actor$Actor$_setter_$context_$eq, akka$actor$Actor$_setter_$self_$eq, aroundPostRestart, aroundPreStart, context, postRestart, preStart, receive, self, sender, supervisorStrategy, unhandled
      • Methods inherited from interface akka.actor.StashSupport

        context, self
    • Method Detail

      • props

        public static akka.actor.Props props​(Duration idleTimeout,
                                             akka.actor.ActorRef sender,
                                             org.eclipse.ditto.model.base.headers.DittoHeaders dittoHeaders)
        Create Props object for the SubscriptionActor.
        Parameters:
        idleTimeout - maximum lifetime while idling
        sender - sender of the command that created this actor.
        dittoHeaders - headers of the command that created this actor.
        Returns:
        Props for this actor.
      • asSubscriber

        public static org.reactivestreams.Subscriber<org.eclipse.ditto.json.JsonArray> asSubscriber​(akka.actor.ActorRef subscriptionActor)
        Wrap a subscription actor as a reactive stream subscriber.
        Parameters:
        subscriptionActor - reference to the subscription actor.
        Returns:
        the actor presented as a reactive stream subscriber.
      • postStop

        public void postStop()
        Specified by:
        postStop in interface akka.actor.Actor
        Specified by:
        postStop in interface akka.actor.UnrestrictedStash
        Overrides:
        postStop in class org.eclipse.ditto.services.utils.akka.actors.AbstractActorWithStashWithTimers
      • createReceive

        public akka.actor.AbstractActor.Receive createReceive()
        Specified by:
        createReceive in class akka.actor.AbstractActor