akka.actor
Class Props

java.lang.Object
  extended by akka.actor.Props
All Implemented Interfaces:
java.io.Serializable, scala.Equals, scala.Product

public final class Props
extends java.lang.Object
implements scala.Product, scala.Serializable

See Also:
Serialized Form

Nested Class Summary
static class Props.EmptyActor
          INTERNAL API
 
Constructor Summary
Props(Deploy deploy, java.lang.Class<?> clazz, scala.collection.immutable.Seq<java.lang.Object> args)
           
 
Method Summary
 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)
           
static
<T extends Actor>
Props
apply(scala.reflect.ClassTag<T> evidence$1)
           
static
<T extends Actor>
Props
apply(scala.Function0<T> creator, scala.reflect.ClassTag<T> evidence$2)
           
 scala.collection.immutable.Seq<java.lang.Object> args()
           
 java.lang.Class<?> clazz()
           
static Props create(java.lang.Class<?> clazz, java.lang.Object... args)
          Java API: create a Props given a class and its constructor arguments.
static Props create(java.lang.Class<?> clazz, scala.collection.Seq<java.lang.Object> args)
           
static
<T extends Actor>
Props
create(java.lang.Class<T> actorClass, Creator<T> creator)
          Create new Props from the given Creator with the type set to the given actorClass.
static
<T extends Actor>
Props
create(Creator<T> creator)
          Create new Props from the given Creator.
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
 java.lang.String mailbox()
          Convenience method for extracting the mailbox information from the contained Deploy instance.
 Actor newActor()
          INTERNAL API
 IndirectActorProducer producer()
          INTERNAL API
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface scala.Product
productArity, productElement, productIterator, productPrefix
 
Methods inherited from interface scala.Equals
canEqual, equals
 

Constructor Detail

Props

public Props(Deploy deploy,
             java.lang.Class<?> clazz,
             scala.collection.immutable.Seq<java.lang.Object> args)
Method Detail

create

public static Props create(java.lang.Class<?> clazz,
                           java.lang.Object... args)
Java API: create a Props given a class and its constructor arguments.

Parameters:
clazz - (undocumented)
args - (undocumented)
Returns:
(undocumented)

defaultCreator

public static final scala.Function0<Actor> defaultCreator()
The defaultCreator, simply throws an UnsupportedOperationException when applied, which is used when creating a Props

Returns:
(undocumented)

defaultRoutedProps

public static final RouterConfig defaultRoutedProps()
The defaultRoutedProps is NoRouter which is used when creating a Props

Returns:
(undocumented)

defaultDeploy

public static final Deploy defaultDeploy()
The default Deploy instance which is used when creating a Props

Returns:
(undocumented)

empty

public static final Props empty()
A Props instance whose creator will create an actor that doesn't respond to any message

Returns:
(undocumented)

apply

public static <T extends Actor> Props apply(scala.reflect.ClassTag<T> evidence$1)

apply

public static <T extends Actor> Props apply(scala.Function0<T> creator,
                                            scala.reflect.ClassTag<T> evidence$2)

apply

public static Props apply(java.lang.Class<?> clazz,
                          scala.collection.Seq<java.lang.Object> args)

create

public static Props create(java.lang.Class<?> clazz,
                           scala.collection.Seq<java.lang.Object> args)

create

public static <T extends Actor> Props create(Creator<T> creator)
Create new Props from the given Creator.

You can not use a Java 8 lambda with this method since the generated classes don't carry enough type information.

Use the Props.create(actorClass, creator) instead.

Parameters:
creator - (undocumented)
Returns:
(undocumented)

create

public static <T extends Actor> Props create(java.lang.Class<T> actorClass,
                                             Creator<T> creator)
Create new Props from the given Creator with the type set to the given actorClass.

Parameters:
actorClass - (undocumented)
creator - (undocumented)
Returns:
(undocumented)

deploy

public Deploy deploy()

clazz

public java.lang.Class<?> clazz()

args

public scala.collection.immutable.Seq<java.lang.Object> args()

producer

public IndirectActorProducer producer()
INTERNAL API

Returns:
(undocumented)

dispatcher

public java.lang.String dispatcher()
Convenience method for extracting the dispatcher information from the contained Deploy instance.

Returns:
(undocumented)

mailbox

public java.lang.String mailbox()
Convenience method for extracting the mailbox information from the contained Deploy instance.

Returns:
(undocumented)

routerConfig

public RouterConfig routerConfig()
Convenience method for extracting the router configuration from the contained Deploy instance.

Returns:
(undocumented)

withDispatcher

public Props withDispatcher(java.lang.String d)
Returns a new Props with the specified dispatcher set.

Parameters:
d - (undocumented)
Returns:
(undocumented)

withMailbox

public Props withMailbox(java.lang.String m)
Returns a new Props with the specified mailbox set.

Parameters:
m - (undocumented)
Returns:
(undocumented)

withRouter

public Props withRouter(RouterConfig r)
Returns a new Props with the specified router config set.

Parameters:
r - (undocumented)
Returns:
(undocumented)

withDeploy

public Props withDeploy(Deploy d)
Returns a new Props with the specified deployment configuration.

Parameters:
d - (undocumented)
Returns:
(undocumented)

actorClass

public java.lang.Class<? extends Actor> actorClass()
Obtain an upper-bound approximation of the actor class which is going to be created by these Props. In other words, the actor factory method will produce an instance of this class or a subclass thereof. This is used by the actor system to select special dispatchers or mailboxes in case dependencies are encoded in the actor type.

Returns:
(undocumented)

newActor

public Actor newActor()
INTERNAL API

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().

Returns:
(undocumented)