public class ScalaDSL$
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static ScalaDSL$ |
MODULE$
Static reference to the singleton instance of this Scala object.
|
Constructor and Description |
---|
ScalaDSL$() |
Modifier and Type | Method and Description |
---|---|
scala.Function1<java.lang.Object,Behavior<scala.runtime.Nothing$>> |
_unhandledFunction()
INTERNAL API.
|
scala.Function1<java.lang.Object,scala.runtime.BoxedUnit> |
_unitFunction()
INTERNAL API.
|
<T> Behavior<T> |
ContextAware(scala.Function1<ActorContext<T>,Behavior<T>> behavior)
A behavior decorator that extracts the
ActorContext while receiving the
the first signal or message and uses that to construct the real behavior
(which will then also receive that signal or message). |
<T> Behavior<T> |
Empty()
This behavior does not handle any inputs, it is completely inert.
|
<T> Behavior<T> |
Ignore()
This behavior does not handle any inputs, it is completely inert.
|
<T> Behavior<T> |
Same()
Return this behavior from message processing in order to advise the
system to reuse the previous behavior.
|
<T> Behavior<T> |
SelfAware(scala.Function1<ActorRef<T>,Behavior<T>> behavior)
A behavior decorator that extracts the self
ActorRef while receiving the
the first signal or message and uses that to construct the real behavior
(which will then also receive that signal or message). |
<T> Behavior<T> |
Stopped()
Return this behavior from message processing to signal that this actor
shall terminate voluntarily.
|
<T> Behavior<T> |
Unhandled()
Return this behavior from message processing in order to advise the
system to reuse the previous behavior, including the hint that the
message has not been handled.
|
<T,U> scala.Function1<T,Behavior<U>> |
unhandledFunction()
INTERNAL API.
|
<T,U> scala.Function1<T,Behavior<U>> |
unitFunction()
INTERNAL API.
|
public static final ScalaDSL$ MODULE$
public <T> Behavior<T> Same()
public <T> Behavior<T> Unhandled()
public <T> Behavior<T> Stopped()
public <T> Behavior<T> Empty()
public <T> Behavior<T> Ignore()
public <T> Behavior<T> SelfAware(scala.Function1<ActorRef<T>,Behavior<T>> behavior)
ActorRef
while receiving the
the first signal or message and uses that to construct the real behavior
(which will then also receive that signal or message).
Example:
SelfAware[MyCommand] { self =>
Simple {
case cmd =>
}
}
This can also be used together with implicitly sender-capturing message types:
final case class OtherMsg(msg: String)(implicit val replyTo: ActorRef[Reply])
SelfAware[MyCommand] { implicit self =>
Simple {
case cmd =>
other ! OtherMsg("hello") // assuming Reply <: MyCommand
}
}
behavior
- (undocumented)public <T> Behavior<T> ContextAware(scala.Function1<ActorContext<T>,Behavior<T>> behavior)
ActorContext
while receiving the
the first signal or message and uses that to construct the real behavior
(which will then also receive that signal or message).
Example:
ContextAware[MyCommand] { ctx => Simple {
case cmd =>
...
}
}
behavior
- (undocumented)public scala.Function1<java.lang.Object,Behavior<scala.runtime.Nothing$>> _unhandledFunction()
public <T,U> scala.Function1<T,Behavior<U>> unhandledFunction()
public scala.Function1<java.lang.Object,scala.runtime.BoxedUnit> _unitFunction()
public <T,U> scala.Function1<T,Behavior<U>> unitFunction()