object Props extends AbstractProps with Serializable
Factory for Props instances.
Props is a ActorRef configuration object, that is immutable, so it is thread safe and fully sharable.
Used when creating new actors through ActorSystem.actorOf
and ActorContext.actorOf
.
- Source
- Props.scala
- Alphabetic
- By Inheritance
- Props
- Serializable
- AbstractProps
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def apply(clazz: Class[_], args: Any*): Props
Scala API: create a Props given a class and its constructor arguments.
- def apply[T <: Actor](creator: => T)(implicit arg0: ClassTag[T]): Props
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 API: Returns a Props that has default values except for "creator" which will be a function that creates an instance using the supplied thunk.
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 inStash
:'Props(new Actor with Stash { ... })
Instead you must create a named class that mixin the trait, e.g.
class MyActor extends Actor with Stash
. - def apply[T <: Actor]()(implicit arg0: ClassTag[T]): Props
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.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
- def create[T <: Actor](actorClass: Class[T], creator: Creator[T]): Props
Create new Props from the given akka.japi.Creator with the type set to the given actorClass.
Create new Props from the given akka.japi.Creator with the type set to the given actorClass.
- Definition Classes
- AbstractProps
- def create(clazz: Class[_], args: AnyRef*): Props
Java API: create a Props given a class and its constructor arguments.
Java API: create a Props given a class and its constructor arguments.
- Definition Classes
- AbstractProps
- Annotations
- @varargs()
- final val default: Props
The default Props instance, uses the settings from the Props object starting with default*.
- final val defaultCreator: () => Actor
The defaultCreator, simply throws an UnsupportedOperationException when applied, which is used when creating a Props
- final val defaultDeploy: Deploy
The default Deploy instance which is used when creating a Props
- final val defaultRoutedProps: RouterConfig
The defaultRoutedProps is NoRouter which is used when creating a Props
- final val empty: Props
A Props instance whose creator will create an actor that doesn't respond to any message
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def create[T <: Actor](creator: Creator[T]): Props
Create new Props from the given akka.japi.Creator.
Create new Props from the given akka.japi.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.
- Definition Classes
- AbstractProps
- Annotations
- @deprecated
- Deprecated
(Since version 2.5.18) Use Props.create(actorClass, creator) instead, since this can't be used with Java 8 lambda.
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)