Package akka.actor.typed.internal
Class MonitorInterceptor<T>
- java.lang.Object
-
- akka.actor.typed.BehaviorInterceptor<T,T>
-
- akka.actor.typed.internal.MonitorInterceptor<T>
-
- All Implemented Interfaces:
java.io.Serializable
,scala.Equals
,scala.Product
,scala.Serializable
public final class MonitorInterceptor<T> extends BehaviorInterceptor<T,T> implements scala.Product, scala.Serializable
Fire off any incoming message to another actor before receiving it ourselves.INTERNAL API
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class akka.actor.typed.BehaviorInterceptor
BehaviorInterceptor.PreStartTarget<T>, BehaviorInterceptor.ReceiveTarget<T>, BehaviorInterceptor.SignalTarget<T>
-
-
Constructor Summary
Constructors Constructor Description MonitorInterceptor(ActorRef<T> actorRef)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ActorRef<T>
actorRef()
static <T> MonitorInterceptor<T>
apply(ActorRef<T> actorRef)
Behavior<T>
aroundReceive(TypedActorContext<T> ctx, T msg, BehaviorInterceptor.ReceiveTarget<T> target)
Intercept a message sent to the running actor.Behavior<T>
aroundSignal(TypedActorContext<T> ctx, Signal signal, BehaviorInterceptor.SignalTarget<T> target)
Intercept a signal sent to the running actor.boolean
canEqual(java.lang.Object x$1)
<T> MonitorInterceptor<T>
copy(ActorRef<T> actorRef)
<T> ActorRef<T>
copy$default$1()
boolean
equals(java.lang.Object x$1)
int
hashCode()
boolean
isSame(BehaviorInterceptor<java.lang.Object,java.lang.Object> other)
int
productArity()
java.lang.Object
productElement(int x$1)
scala.collection.Iterator<java.lang.Object>
productIterator()
java.lang.String
productPrefix()
java.lang.String
toString()
static <T> scala.Option<ActorRef<T>>
unapply(MonitorInterceptor<T> x$0)
-
Methods inherited from class akka.actor.typed.BehaviorInterceptor
aroundStart, interceptMessageType
-
-
-
-
Method Detail
-
apply
public static <T> MonitorInterceptor<T> apply(ActorRef<T> actorRef)
-
unapply
public static <T> scala.Option<ActorRef<T>> unapply(MonitorInterceptor<T> x$0)
-
aroundReceive
public Behavior<T> aroundReceive(TypedActorContext<T> ctx, T msg, BehaviorInterceptor.ReceiveTarget<T> target)
Description copied from class:BehaviorInterceptor
Intercept a message sent to the running actor. Pass the message on to the next behavior in the stack by passing it totarget.apply
, returnBehaviors.same
without invokingtarget
to filter out the message.- Specified by:
aroundReceive
in classBehaviorInterceptor<T,T>
- Parameters:
ctx
- (undocumented)msg
- (undocumented)target
- (undocumented)- Returns:
- The behavior for next message or signal
-
aroundSignal
public Behavior<T> aroundSignal(TypedActorContext<T> ctx, Signal signal, BehaviorInterceptor.SignalTarget<T> target)
Description copied from class:BehaviorInterceptor
Intercept a signal sent to the running actor. Pass the signal on to the next behavior in the stack by passing it totarget.apply
.- Specified by:
aroundSignal
in classBehaviorInterceptor<T,T>
- Parameters:
ctx
- (undocumented)signal
- (undocumented)target
- (undocumented)- Returns:
- The behavior for next message or signal
-
isSame
public boolean isSame(BehaviorInterceptor<java.lang.Object,java.lang.Object> other)
- Overrides:
isSame
in classBehaviorInterceptor<T,T>
- Parameters:
other
- (undocumented)- 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.
-
copy
public <T> MonitorInterceptor<T> copy(ActorRef<T> actorRef)
-
copy$default$1
public <T> ActorRef<T> copy$default$1()
-
productPrefix
public java.lang.String productPrefix()
- Specified by:
productPrefix
in interfacescala.Product
-
productArity
public int productArity()
- Specified by:
productArity
in interfacescala.Product
-
productElement
public java.lang.Object productElement(int x$1)
- Specified by:
productElement
in interfacescala.Product
-
productIterator
public scala.collection.Iterator<java.lang.Object> productIterator()
- Specified by:
productIterator
in interfacescala.Product
-
canEqual
public boolean canEqual(java.lang.Object x$1)
- Specified by:
canEqual
in interfacescala.Equals
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object x$1)
- Specified by:
equals
in interfacescala.Equals
- Overrides:
equals
in classjava.lang.Object
-
-