public final class Props
extends java.lang.Object
implements scala.Product, scala.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
Props.EmptyActor
INTERNAL API
|
Constructor and Description |
---|
Props(Deploy deploy,
java.lang.Class<?> clazz,
scala.collection.immutable.Seq<java.lang.Object> args) |
Modifier and Type | Method and Description |
---|---|
java.lang.Class<? extends Actor> |
actorClass()
Obtain an upper-bound approximation of the actor class which is going to
be created by these Props.
|
static Props |
apply(java.lang.Class<?> clazz,
scala.collection.Seq<java.lang.Object> args)
Scala API: create a Props given a class and its constructor arguments.
|
static <T extends Actor> |
apply(scala.reflect.ClassTag<T> evidence$1)
Scala API: Returns a Props that has default values except for "creator" which will be a function that creates an instance
of the supplied type using the default constructor.
|
static <T extends Actor> |
apply(scala.Function0<T> creator,
scala.reflect.ClassTag<T> evidence$2)
Scala API: Returns a Props that has default values except for "creator" which will be a function that creates an instance
using the supplied thunk.
|
scala.collection.immutable.Seq<java.lang.Object> |
args() |
abstract static boolean |
canEqual(java.lang.Object that) |
java.lang.Class<?> |
clazz() |
static scala.Function0<Actor> |
defaultCreator()
The defaultCreator, simply throws an UnsupportedOperationException when applied, which is used when creating a Props
|
static Deploy |
defaultDeploy()
The default Deploy instance which is used when creating a Props
|
static RouterConfig |
defaultRoutedProps()
The defaultRoutedProps is NoRouter which is used when creating a Props
|
Deploy |
deploy() |
java.lang.String |
dispatcher()
Convenience method for extracting the dispatcher information from the
contained
Deploy instance. |
static Props |
empty()
A Props instance whose creator will create an actor that doesn't respond to any message
|
abstract static boolean |
equals(java.lang.Object that) |
java.lang.String |
mailbox()
Convenience method for extracting the mailbox information from the
contained
Deploy instance. |
Actor |
newActor()
INTERNAL API
|
IndirectActorProducer |
producer()
INTERNAL API
|
abstract static int |
productArity() |
abstract static java.lang.Object |
productElement(int n) |
static scala.collection.Iterator<java.lang.Object> |
productIterator() |
static java.lang.String |
productPrefix() |
RouterConfig |
routerConfig()
Convenience method for extracting the router configuration from the
contained
Deploy instance. |
Props |
withDeploy(Deploy d)
Returns a new Props with the specified deployment configuration.
|
Props |
withDispatcher(java.lang.String d)
Returns a new Props with the specified dispatcher set.
|
Props |
withMailbox(java.lang.String m)
Returns a new Props with the specified mailbox set.
|
Props |
withRouter(RouterConfig r)
Returns a new Props with the specified router config set.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public Props(Deploy deploy, java.lang.Class<?> clazz, scala.collection.immutable.Seq<java.lang.Object> args)
public static final scala.Function0<Actor> defaultCreator()
public static final RouterConfig defaultRoutedProps()
public static final Deploy defaultDeploy()
public static final Props empty()
public static <T extends Actor> Props apply(scala.reflect.ClassTag<T> evidence$1)
evidence$1
- (undocumented)public static <T extends Actor> Props apply(scala.Function0<T> creator, scala.reflect.ClassTag<T> evidence$2)
CAVEAT: Required mailbox type cannot be detected when using anonymous mixin composition
when creating the instance. For example, the following will not detect the need for
DequeBasedMessageQueueSemantics
as defined in Stash
:
'Props(new Actor with Stash { ... })
Instead you must create a named class that mixin the trait,
e.g. class MyActor extends Actor with Stash
.creator
- (undocumented)evidence$2
- (undocumented)public static Props apply(java.lang.Class<?> clazz, scala.collection.Seq<java.lang.Object> args)
clazz
- (undocumented)args
- (undocumented)public abstract static boolean canEqual(java.lang.Object that)
public abstract static boolean equals(java.lang.Object that)
public abstract static java.lang.Object productElement(int n)
public abstract static int productArity()
public static scala.collection.Iterator<java.lang.Object> productIterator()
public static java.lang.String productPrefix()
public Deploy deploy()
public java.lang.Class<?> clazz()
public scala.collection.immutable.Seq<java.lang.Object> args()
public IndirectActorProducer producer()
public java.lang.String dispatcher()
Deploy
instance.public java.lang.String mailbox()
Deploy
instance.public RouterConfig routerConfig()
Deploy
instance.public Props withDispatcher(java.lang.String d)
d
- (undocumented)public Props withMailbox(java.lang.String m)
m
- (undocumented)public Props withRouter(RouterConfig r)
r
- (undocumented)public Props withDeploy(Deploy d)
d
- (undocumented)public java.lang.Class<? extends Actor> actorClass()
public Actor newActor()
Create a new actor instance. This method is only useful when called during
actor creation by the ActorSystem, i.e. for user-level code it can only be
used within the implementation of IndirectActorProducer.produce()
.