Class Props

  • All Implemented Interfaces:
    java.io.Serializable, scala.Equals, scala.Product
    Direct Known Subclasses:
    ActorTags, DispatcherSelector, MailboxSelector, PropsImpl.EmptyProps$

    public abstract class Props
    extends java.lang.Object
    implements scala.Product, java.io.Serializable
    Data structure for describing an actor’s props details like which executor to run it on. For each type of setting (e.g. DispatcherSelector) the FIRST occurrence is used when creating the actor; this means that adding configuration using the "with" methods overrides what was configured previously.

    Deliberately not sealed in order to emphasize future extensibility by the framework—this is not intended to be extended by user code.

    Not for user extension.

    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      Props()  
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      <T extends Props>
      scala.collection.immutable.List<Props>
      allOf​(scala.reflect.ClassTag<T> evidence$2)
      Retrieve all configuration nodes of a given type in the order that they are present in this Props.
      static Props empty()
      Empty props instance, should seldom be needed in user code but can be useful as a default props where custom configuration of an actor is possible.
      <T extends Props>
      Props
      filterNot​(scala.reflect.ClassTag<T> evidence$3)
      Remove all configuration nodes of a given type and return the resulting Props.
      <T extends Props>
      T
      firstOrElse​(T default_, scala.reflect.ClassTag<T> evidence$1)
      Find the first occurrence of a configuration node of the given type, falling back to the provided default if none is found.
      abstract Props next()
      Reference to the tail of this Props list.
      Props withDispatcherDefault()
      Prepend a selection of the ActorSystem default executor to this Props.
      Props withDispatcherFromConfig​(java.lang.String path)
      Prepend a selection of the executor found at the given Config path to this Props.
      Props withDispatcherSameAsParent()
      Prepend a selection of the same executor as the parent actor to this Props.
      abstract Props withNext​(Props next)
      Create a copy of this Props node with its next reference replaced by the given object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface scala.Equals

        canEqual, equals
      • Methods inherited from interface scala.Product

        productArity, productElement, productElementName, productElementNames, productIterator, productPrefix
    • Constructor Detail

      • Props

        public Props()
    • Method Detail

      • empty

        public static Props empty()
        Empty props instance, should seldom be needed in user code but can be useful as a default props where custom configuration of an actor is possible.
      • next

        public abstract Props next()
        Reference to the tail of this Props list.

        The next reference is here so that it can form an internally linked list. Traversal of this list stops when encountering the EmptyProps object.

        INTERNAL API

      • withNext

        public abstract Props withNext​(Props next)
        Create a copy of this Props node with its next reference replaced by the given object. This does NOT append the given list of configuration nodes to the current list!

        INTERNAL API

      • withDispatcherDefault

        public Props withDispatcherDefault()
        Prepend a selection of the ActorSystem default executor to this Props.
      • withDispatcherFromConfig

        public Props withDispatcherFromConfig​(java.lang.String path)
        Prepend a selection of the executor found at the given Config path to this Props. The path is relative to the configuration root of the ActorSystem that looks up the executor.
      • withDispatcherSameAsParent

        public Props withDispatcherSameAsParent()
        Prepend a selection of the same executor as the parent actor to this Props.
      • firstOrElse

        public <T extends Props> T firstOrElse​(T default_,
                                               scala.reflect.ClassTag<T> evidence$1)
        Find the first occurrence of a configuration node of the given type, falling back to the provided default if none is found.

        INTERNAL API

      • allOf

        public <T extends Props> scala.collection.immutable.List<Props> allOf​(scala.reflect.ClassTag<T> evidence$2)
        Retrieve all configuration nodes of a given type in the order that they are present in this Props. The next reference for all returned nodes will be the EmptyProps.

        INTERNAL API

      • filterNot

        public <T extends PropsProps filterNot​(scala.reflect.ClassTag<T> evidence$3)
        Remove all configuration nodes of a given type and return the resulting Props.