Interface ActorPublisher<T>
-
- All Superinterfaces:
Actor
- All Known Implementing Classes:
AbstractActorPublisher
,AbstractActorPublisherWithStash
,AbstractActorPublisherWithUnboundedStash
,AbstractActorPublisherWithUnrestrictedStash
,AbstractEventsByPersistenceIdPublisher
,AbstractEventsByTagPublisher
,AllPersistenceIdsPublisher
,CurrentEventsByPersistenceIdPublisher
,CurrentEventsByTagPublisher
,InputStreamPublisher
,LiveEventsByPersistenceIdPublisher
,LiveEventsByTagPublisher
,UntypedActorPublisher
public interface ActorPublisher<T> extends Actor
Deprecated.Use `akka.stream.stage.GraphStage` instead, it allows for all operations an Actor would and is more type-safe as well as guaranteed to be ReactiveStreams compliant. Since 2.5.0.Subscription timeout after which this actor will become Canceled and reject any incoming "late" subscriber.The actor will receive an
SubscriptionTimeoutExceeded
message upon which it MUST react by performing all necessary cleanup and stopping itself.Use this feature in order to avoid leaking actors when you suspect that this Publisher may never get subscribed to by some Subscriber.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ActorPublisher.Internal$
Deprecated.INTERNAL API-
Nested classes/interfaces inherited from interface akka.actor.Actor
Actor.emptyBehavior$, Actor.ignoringBehavior$
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
aroundPostRestart(java.lang.Throwable reason)
Deprecated.INTERNAL APIvoid
aroundPostStop()
Deprecated.INTERNAL APIvoid
aroundPreRestart(java.lang.Throwable reason, scala.Option<java.lang.Object> message)
Deprecated.INTERNAL APIvoid
aroundPreStart()
Deprecated.INTERNAL APIvoid
aroundReceive(scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receive, java.lang.Object msg)
Deprecated.INTERNAL APIvoid
cancelSelf()
Deprecated.void
demand_$eq(long x$1)
Deprecated.boolean
isActive()
Deprecated.The state when the publisher is active, i.e.boolean
isCanceled()
Deprecated.The state after the stream subscriber has canceled the subscription.boolean
isCompleted()
Deprecated.The terminal state after callingonComplete()
.boolean
isErrorEmitted()
Deprecated.The terminal state after callingonError(java.lang.Throwable)
.void
lifecycleState_$eq(akka.stream.actor.ActorPublisher.Internal.LifecycleState x$1)
Deprecated.void
onComplete()
Deprecated.Complete the stream.void
onCompleteThenStop()
Deprecated.Complete the stream.void
onError(java.lang.Throwable cause)
Deprecated.Terminate the stream with failure.void
onErrorThenStop(java.lang.Throwable cause)
Deprecated.Terminate the stream with failure.void
onNext(T element)
Deprecated.Send an element to the stream subscriber.void
scheduledSubscriptionTimeout_$eq(Cancellable x$1)
Deprecated.void
subscriber_$eq(org.reactivestreams.Subscriber<java.lang.Object> x$1)
Deprecated.scala.concurrent.duration.Duration
subscriptionTimeout()
Deprecated.Subscription timeout after which this actor will become Canceled and reject any incoming "late" subscriber.void
super$aroundPostRestart(java.lang.Throwable reason)
Deprecated.INTERNAL APIvoid
super$aroundPostStop()
Deprecated.INTERNAL APIvoid
super$aroundPreRestart(java.lang.Throwable reason, scala.Option<java.lang.Object> message)
Deprecated.INTERNAL APIvoid
super$aroundPreStart()
Deprecated.INTERNAL APIvoid
super$aroundReceive(scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receive, java.lang.Object msg)
Deprecated.INTERNAL APIlong
totalDemand()
Deprecated.Total number of requested elements from the stream subscriber.-
Methods inherited from interface akka.actor.Actor
akka$actor$Actor$_setter_$context_$eq, akka$actor$Actor$_setter_$self_$eq, context, postRestart, postStop, preRestart, preStart, receive, self, sender, supervisorStrategy, unhandled
-
-
-
-
Method Detail
-
super$aroundReceive
void super$aroundReceive(scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receive, java.lang.Object msg)
Deprecated.INTERNAL API- Parameters:
receive
- (undocumented)msg
- (undocumented)
-
super$aroundPreStart
void super$aroundPreStart()
Deprecated.INTERNAL API
-
super$aroundPreRestart
void super$aroundPreRestart(java.lang.Throwable reason, scala.Option<java.lang.Object> message)
Deprecated.INTERNAL API- Parameters:
reason
- (undocumented)message
- (undocumented)
-
super$aroundPostRestart
void super$aroundPostRestart(java.lang.Throwable reason)
Deprecated.INTERNAL API- Parameters:
reason
- (undocumented)
-
super$aroundPostStop
void super$aroundPostStop()
Deprecated.INTERNAL API
-
subscriber_$eq
void subscriber_$eq(org.reactivestreams.Subscriber<java.lang.Object> x$1)
Deprecated.
-
demand_$eq
void demand_$eq(long x$1)
Deprecated.
-
lifecycleState_$eq
void lifecycleState_$eq(akka.stream.actor.ActorPublisher.Internal.LifecycleState x$1)
Deprecated.
-
scheduledSubscriptionTimeout_$eq
void scheduledSubscriptionTimeout_$eq(Cancellable x$1)
Deprecated.
-
subscriptionTimeout
scala.concurrent.duration.Duration subscriptionTimeout()
Deprecated.Subscription timeout after which this actor will become Canceled and reject any incoming "late" subscriber.The actor will receive an
SubscriptionTimeoutExceeded
message upon which it MUST react by performing all necessary cleanup and stopping itself.Use this feature in order to avoid leaking actors when you suspect that this Publisher may never get subscribed to by some Subscriber.
- Returns:
- (undocumented)
-
isActive
boolean isActive()
Deprecated.The state when the publisher is active, i.e. before the subscriber is attached and when an subscriber is attached. It is allowed to callonComplete()
andonError(java.lang.Throwable)
in this state. It is allowed to callonNext(T)
in this state whentotalDemand()
is greater than zero.- Returns:
- (undocumented)
-
totalDemand
long totalDemand()
Deprecated.Total number of requested elements from the stream subscriber. This actor automatically keeps tracks of this amount based on incoming request messages and outgoingonNext
.- Returns:
- (undocumented)
-
isCompleted
boolean isCompleted()
Deprecated.The terminal state after callingonComplete()
. It is not allowed to callonNext(T)
,onError(java.lang.Throwable)
, andonComplete()
in this state.- Returns:
- (undocumented)
-
isErrorEmitted
boolean isErrorEmitted()
Deprecated.The terminal state after callingonError(java.lang.Throwable)
. It is not allowed to callonNext(T)
,onError(java.lang.Throwable)
, andonComplete()
in this state.- Returns:
- (undocumented)
-
isCanceled
boolean isCanceled()
Deprecated.The state after the stream subscriber has canceled the subscription. It is allowed to callonNext(T)
,onError(java.lang.Throwable)
, andonComplete()
in this state, but the calls will not perform anything.- Returns:
- (undocumented)
-
onNext
void onNext(T element)
Deprecated.Send an element to the stream subscriber. You are allowed to send as many elements as have been requested by the stream subscriber. This amount can be inquired withtotalDemand()
. It is only allowed to useonNext
whenisActive
andtotalDemand > 0
, otherwiseonNext
will throwIllegalStateException
.- Parameters:
element
- (undocumented)
-
onComplete
void onComplete()
Deprecated.Complete the stream. After that you are not allowed to callonNext(T)
,onError(java.lang.Throwable)
andonComplete()
.
-
onCompleteThenStop
void onCompleteThenStop()
Deprecated.Complete the stream. After that you are not allowed to callonNext(T)
,onError(java.lang.Throwable)
andonComplete()
.After signaling completion the Actor will then stop itself as it has completed the protocol. When
onComplete()
is called before anySubscriber
has had the chance to subscribe to thisActorPublisher
the completion signal (and therefore stopping of the Actor as well) will be delayed until suchSubscriber
arrives.
-
onError
void onError(java.lang.Throwable cause)
Deprecated.Terminate the stream with failure. After that you are not allowed to callonNext(T)
,onError(java.lang.Throwable)
andonComplete()
.- Parameters:
cause
- (undocumented)
-
onErrorThenStop
void onErrorThenStop(java.lang.Throwable cause)
Deprecated.Terminate the stream with failure. After that you are not allowed to callonNext(T)
,onError(java.lang.Throwable)
andonComplete()
.After signaling the Error the Actor will then stop itself as it has completed the protocol. When
onError(java.lang.Throwable)
is called before anySubscriber
has had the chance to subscribe to thisActorPublisher
the error signal (and therefore stopping of the Actor as well) will be delayed until suchSubscriber
arrives.- Parameters:
cause
- (undocumented)
-
aroundReceive
void aroundReceive(scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receive, java.lang.Object msg)
Deprecated.INTERNAL API- Specified by:
aroundReceive
in interfaceActor
- Parameters:
receive
- (undocumented)msg
- (undocumented)
-
cancelSelf
void cancelSelf()
Deprecated.
-
aroundPreStart
void aroundPreStart()
Deprecated.INTERNAL API- Specified by:
aroundPreStart
in interfaceActor
-
aroundPreRestart
void aroundPreRestart(java.lang.Throwable reason, scala.Option<java.lang.Object> message)
Deprecated.INTERNAL API- Specified by:
aroundPreRestart
in interfaceActor
- Parameters:
reason
- (undocumented)message
- (undocumented)
-
aroundPostRestart
void aroundPostRestart(java.lang.Throwable reason)
Deprecated.INTERNAL API- Specified by:
aroundPostRestart
in interfaceActor
- Parameters:
reason
- (undocumented)
-
aroundPostStop
void aroundPostStop()
Deprecated.INTERNAL API- Specified by:
aroundPostStop
in interfaceActor
-
-