Package akka.actor.typed.internal
Class BehaviorImpl
- java.lang.Object
-
- akka.actor.typed.internal.BehaviorImpl
-
public class BehaviorImpl extends java.lang.Object
INTERNAL API
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BehaviorImpl.ContextAs<T>
static class
BehaviorImpl.ContextAs$
static class
BehaviorImpl.DeferredBehavior<T>
static class
BehaviorImpl.DeferredBehavior$
static class
BehaviorImpl.FailedBehavior
static class
BehaviorImpl.ReceiveBehavior<T>
static class
BehaviorImpl.ReceiveBehavior$
static class
BehaviorImpl.ReceiveMessageBehavior<T>
Similar toBehaviorImpl.ReceiveBehavior
howeveronMessage
does not accept context.static class
BehaviorImpl.ReceiveMessageBehavior$
static class
BehaviorImpl.SameBehavior$
static class
BehaviorImpl.UnhandledBehavior$
-
Constructor Summary
Constructors Constructor Description BehaviorImpl()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> BehaviorImpl.ContextAs<T>
ContextAs(TypedActorContext<T> ctx)
static <T> Behavior<T>
empty()
static <T> Behavior<T>
failed(java.lang.Throwable cause)
static <T> Behavior<T>
ignore()
static <O,I>
Behavior<O>intercept(scala.Function0<BehaviorInterceptor<O,I>> interceptor, Behavior<I> behavior)
Intercept messages and signals for abehavior
by first passing them to aBehaviorInterceptor
static <T> Behavior<T>
same()
static <T> Behavior<T>
stopped()
static <T> Behavior<T>
stopped(scala.Function0<scala.runtime.BoxedUnit> postStop)
static akka.actor.typed.internal.BehaviorImpl.StoppedBehavior<scala.runtime.Nothing$>
StoppedBehavior()
static <O,I>
Behavior<O>transformMessages(Behavior<I> behavior, scala.PartialFunction<O,I> matcher, scala.reflect.ClassTag<O> evidence$1)
static <T> Behavior<T>
unhandled()
static scala.PartialFunction<scala.Tuple2<TypedActorContext<scala.runtime.Nothing$>,Signal>,Behavior<scala.runtime.Nothing$>>
unhandledSignal()
-
-
-
Method Detail
-
ContextAs
public static <T> BehaviorImpl.ContextAs<T> ContextAs(TypedActorContext<T> ctx)
-
transformMessages
public static <O,I> Behavior<O> transformMessages(Behavior<I> behavior, scala.PartialFunction<O,I> matcher, scala.reflect.ClassTag<O> evidence$1)
-
same
public static <T> Behavior<T> same()
-
unhandled
public static <T> Behavior<T> unhandled()
-
stopped
public static <T> Behavior<T> stopped()
-
stopped
public static <T> Behavior<T> stopped(scala.Function0<scala.runtime.BoxedUnit> postStop)
-
empty
public static <T> Behavior<T> empty()
-
ignore
public static <T> Behavior<T> ignore()
-
failed
public static <T> Behavior<T> failed(java.lang.Throwable cause)
-
unhandledSignal
public static scala.PartialFunction<scala.Tuple2<TypedActorContext<scala.runtime.Nothing$>,Signal>,Behavior<scala.runtime.Nothing$>> unhandledSignal()
-
StoppedBehavior
public static akka.actor.typed.internal.BehaviorImpl.StoppedBehavior<scala.runtime.Nothing$> StoppedBehavior()
-
intercept
public static <O,I> Behavior<O> intercept(scala.Function0<BehaviorInterceptor<O,I>> interceptor, Behavior<I> behavior)
Intercept messages and signals for abehavior
by first passing them to aBehaviorInterceptor
When a behavior returns a new behavior as a result of processing a signal or message and that behavior already contains the same interceptor (defined by the
isSame
method on theBehaviorInterceptor
) only the innermost interceptor is kept. This is to protect against stack overflow when recursively defining behaviors.
-
-