Package akka.actor.dsl
Class Inbox$Inbox
- java.lang.Object
-
- akka.actor.Inbox
-
- akka.actor.dsl.Inbox$Inbox
-
public class Inbox$Inbox extends Inbox
Receive a single message from the internalreceiver
actor. The supplied timeout is used for cleanup purposes and its precision is subject to the resolution of the system’s scheduler (usually 100ms, but configurable).Warning: This method blocks the current thread until a message is received, thus it can introduce dead-locks (directly as well as indirectly by causing starvation of the thread pool). Do not use this method within an actor!
-
-
Constructor Summary
Constructors Constructor Description Inbox$Inbox(ActorSystem system)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
finalize()
Overridden finalizer which will try to stop the actor once this Inbox is no longer referenced.ActorRef
getRef()
Obtain a reference to the internal actor, which can then for example be registered with the event stream or whatever else you may want to do with anActorRef
.java.lang.Object
receive(scala.concurrent.duration.FiniteDuration timeout)
Receive a single message from the internalreceiver
actor.scala.concurrent.duration.FiniteDuration
receive$default$1()
ActorRef
receiver()
<T> T
select(scala.concurrent.duration.FiniteDuration timeout, scala.PartialFunction<java.lang.Object,T> predicate)
Receive a single message for which the given partial function is defined and return the transformed result, using the internalreceiver
actor.<T> scala.concurrent.duration.FiniteDuration
select$default$1()
void
send(ActorRef target, java.lang.Object msg)
Have the internal actor act as the sender of the given message which will be sent to the given target.void
watch(ActorRef target)
Make the inbox’s actor watch the target actor such that reception of the Terminated message can then be awaited.
-
-
-
Constructor Detail
-
Inbox$Inbox
public Inbox$Inbox(ActorSystem system)
-
-
Method Detail
-
finalize
public void finalize()
Overridden finalizer which will try to stop the actor once this Inbox is no longer referenced.- Overrides:
finalize
in classjava.lang.Object
-
getRef
public ActorRef getRef()
Description copied from class:Inbox
Obtain a reference to the internal actor, which can then for example be registered with the event stream or whatever else you may want to do with anActorRef
.
-
receive
public java.lang.Object receive(scala.concurrent.duration.FiniteDuration timeout)
Receive a single message from the internalreceiver
actor. The supplied timeout is used for cleanup purposes and its precision is subject to the resolution of the system’s scheduler (usually 100ms, but configurable).Warning: This method blocks the current thread until a message is received, thus it can introduce dead-locks (directly as well as indirectly by causing starvation of the thread pool). Do not use this method within an actor!
-
receive$default$1
public scala.concurrent.duration.FiniteDuration receive$default$1()
-
receiver
public ActorRef receiver()
-
select
public <T> T select(scala.concurrent.duration.FiniteDuration timeout, scala.PartialFunction<java.lang.Object,T> predicate)
Receive a single message for which the given partial function is defined and return the transformed result, using the internalreceiver
actor. The supplied timeout is used for cleanup purposes and its precision is subject to the resolution of the system’s scheduler (usually 100ms, but configurable).Warning: This method blocks the current thread until a message is received, thus it can introduce dead-locks (directly as well as indirectly by causing starvation of the thread pool). Do not use this method within an actor!
- Parameters:
timeout
- (undocumented)predicate
- (undocumented)- Returns:
- (undocumented)
-
select$default$1
public <T> scala.concurrent.duration.FiniteDuration select$default$1()
-
send
public void send(ActorRef target, java.lang.Object msg)
Description copied from class:Inbox
Have the internal actor act as the sender of the given message which will be sent to the given target. This means that should the target actor reply then those replies will be received by this Inbox.
-
-