Class ActorSpec<T extends Actor<Message,​V>,​Message,​V>

  • All Implemented Interfaces:
    ActorBuilder<Message,​V>

    public class ActorSpec<T extends Actor<Message,​V>,​Message,​V>
    extends java.lang.Object
    implements ActorBuilder<Message,​V>
    A specification of how to construct an actor
    • Constructor Summary

      Constructors 
      Constructor Description
      ActorSpec​(java.lang.Class<T> type, java.lang.Object[] params)
      Specifies an actor of a given type and given constructor parameters.
      ActorSpec​(java.lang.reflect.Constructor<T> ctor, java.lang.Object[] params)
      Specifies an actor with given constructor and given constructor parameters.
      ActorSpec​(java.lang.String className, java.lang.Object[] params)
      Specifies an actor of a given type and given constructor parameters.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T build()
      Constructs a new actor
      static <Message,​V,​T extends Actor<Message,​V>>
      ActorSpec<T,​Message,​V>
      of​(com.google.common.reflect.TypeToken<T> type, java.lang.Object... params)
      Creates an ActorSpec
      static <Message,​V,​T extends Actor<Message,​V>>
      ActorSpec<T,​Message,​V>
      of​(java.lang.Class<T> type, java.lang.Object... params)
      Creates an ActorSpec
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ActorSpec

        public ActorSpec​(java.lang.String className,
                         java.lang.Object[] params)
        Specifies an actor of a given type and given constructor parameters.
        Parameters:
        className - the name of the actor class
        params - the parameters to pass to the actor's constructors
      • ActorSpec

        public ActorSpec​(java.lang.Class<T> type,
                         java.lang.Object[] params)
        Specifies an actor of a given type and given constructor parameters.
        Parameters:
        type - the type of the actor
        params - the parameters to pass to the actor's constructors
      • ActorSpec

        public ActorSpec​(java.lang.reflect.Constructor<T> ctor,
                         java.lang.Object[] params)
        Specifies an actor with given constructor and given constructor parameters.
        Parameters:
        ctor - the actor's constructor
        params - the parameters to pass to the actor's constructors
    • Method Detail

      • of

        public static <Message,​V,​T extends Actor<Message,​V>> ActorSpec<T,​Message,​V> of​(java.lang.Class<T> type,
                                                                                                                     java.lang.Object... params)
        Creates an ActorSpec
        Parameters:
        type - the actor's type
        params - the actor's constructor parameters.
      • of

        public static <Message,​V,​T extends Actor<Message,​V>> ActorSpec<T,​Message,​V> of​(com.google.common.reflect.TypeToken<T> type,
                                                                                                                     java.lang.Object... params)
        Creates an ActorSpec
        Parameters:
        type - the actor's type
        params - the actor's constructor parameters.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object