abstract class BehaviorSignalInterceptor[Inner] extends BehaviorInterceptor[Inner, Inner]
A behavior interceptor allows for intercepting signals reception and perform arbitrary logic - transform, filter, send to a side channel etc.
The BehaviorSignalInterceptor
API is considered a low level tool for building other features and
shouldn't be used for "normal" application logic. Several built-in intercepting behaviors
are provided through factories in the respective Behaviors
.
If the interceptor does keep mutable state care must be taken to create a new instance from
the factory function of Behaviors.intercept
so that a new instance is created per spawned
actor rather than shared among actor instance.
- Inner
The inner message type - the type of message the wrapped behavior accepts
- Source
- BehaviorInterceptor.scala
- See also
- Alphabetic
- By Inheritance
- BehaviorSignalInterceptor
- BehaviorInterceptor
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new BehaviorSignalInterceptor()
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def +(other: String): String
- Implicit
- This member is added by an implicit conversion from BehaviorSignalInterceptor[Inner] toany2stringadd[BehaviorSignalInterceptor[Inner]] performed by method any2stringadd in scala.Predef.
- Definition Classes
- any2stringadd
- def ->[B](y: B): (BehaviorSignalInterceptor[Inner], B)
- Implicit
- This member is added by an implicit conversion from BehaviorSignalInterceptor[Inner] toArrowAssoc[BehaviorSignalInterceptor[Inner]] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @inline()
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def aroundReceive(ctx: TypedActorContext[Inner], msg: Inner, target: ReceiveTarget[Inner]): Behavior[Inner]
Only signals and not messages are intercepted by
BehaviorSignalInterceptor
.Only signals and not messages are intercepted by
BehaviorSignalInterceptor
.- returns
The behavior for next message or signal
- Definition Classes
- BehaviorSignalInterceptor → BehaviorInterceptor
- def aroundSignal(ctx: TypedActorContext[Inner], signal: Signal, target: SignalTarget[Inner]): Behavior[Inner]
Override to intercept a signal sent to the running actor.
Override to intercept a signal sent to the running actor. Pass the signal on to the next behavior in the stack by passing it to
target.apply
.- returns
The behavior for next message or signal
- Definition Classes
- BehaviorInterceptor
- See also
- def aroundStart(ctx: TypedActorContext[Inner], target: PreStartTarget[Inner]): Behavior[Inner]
Override to intercept actor startup.
Override to intercept actor startup. To trigger startup of the next behavior in the stack, call
target.start()
.- returns
The returned behavior will be the "started" behavior of the actor used to accept the next message or signal.
- Definition Classes
- BehaviorInterceptor
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
- def ensuring(cond: (BehaviorSignalInterceptor[Inner]) => Boolean, msg: => Any): BehaviorSignalInterceptor[Inner]
- Implicit
- This member is added by an implicit conversion from BehaviorSignalInterceptor[Inner] toEnsuring[BehaviorSignalInterceptor[Inner]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: (BehaviorSignalInterceptor[Inner]) => Boolean): BehaviorSignalInterceptor[Inner]
- Implicit
- This member is added by an implicit conversion from BehaviorSignalInterceptor[Inner] toEnsuring[BehaviorSignalInterceptor[Inner]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: Boolean, msg: => Any): BehaviorSignalInterceptor[Inner]
- Implicit
- This member is added by an implicit conversion from BehaviorSignalInterceptor[Inner] toEnsuring[BehaviorSignalInterceptor[Inner]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: Boolean): BehaviorSignalInterceptor[Inner]
- Implicit
- This member is added by an implicit conversion from BehaviorSignalInterceptor[Inner] toEnsuring[BehaviorSignalInterceptor[Inner]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- val interceptMessageClass: Class[Inner]
- Definition Classes
- BehaviorInterceptor
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isSame(other: BehaviorInterceptor[Any, Any]): Boolean
- returns
true
if this behavior logically the same as another behavior interceptor and can therefore be eliminated (to avoid building infinitely growing stacks of behaviors)? Default implementation is based on instance equality. Override to provide use case specific logic.
- Definition Classes
- BehaviorInterceptor
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)
- def formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from BehaviorSignalInterceptor[Inner] toStringFormat[BehaviorSignalInterceptor[Inner]] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 2.12.16) Use
formatString.format(value)
instead ofvalue.formatted(formatString)
, or use thef""
string interpolator. In Java 15 and later,formatted
resolves to the new method in String which has reversed parameters.
- def →[B](y: B): (BehaviorSignalInterceptor[Inner], B)
- Implicit
- This member is added by an implicit conversion from BehaviorSignalInterceptor[Inner] toArrowAssoc[BehaviorSignalInterceptor[Inner]] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) Use
->
instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.