Package

de.knutwalker.akka

typed

Permalink

package typed

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. typed
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Type Members

  1. type ActorRef[A] = AnyRef { ... /* 2 definitions in type refinement */ }

    Permalink
  2. type Props[A] = AnyRef { ... /* 2 definitions in type refinement */ }

    Permalink
  3. type UntypedActorRef = akka.actor.ActorRef

    Permalink
  4. type UntypedProps = akka.actor.Props

    Permalink

Value Members

  1. def ActorOf[A](p: Props[A])(implicit factory: ActorRefFactory): ActorRef[A]

    Permalink
  2. def ActorOf[A](p: Props[A], name: String)(implicit factory: ActorRefFactory): ActorRef[A]

    Permalink
  3. def Props[A](p: UntypedProps): Props[A]

    Permalink
  4. def Props[A, T <: Actor](clazz: Class[T], args: Any*): Props[A]

    Permalink
  5. def Props[A, T <: Actor](creator: ⇒ T)(implicit arg0: ClassTag[T]): Props[A]

    Permalink
  6. def Props[A, T <: Actor](implicit arg0: ClassTag[T]): Props[A]

    Permalink
  7. def PropsFor[T <: TypedActor](clazz: Class[T], args: Any*): Props[typed.PropsFor.T.Message]

    Permalink
  8. def PropsFor[T <: TypedActor](creator: ⇒ T)(implicit arg0: ClassTag[T]): Props[typed.PropsFor.T.Message]

    Permalink
  9. def PropsFor[T <: TypedActor](implicit arg0: ClassTag[T]): Props[typed.PropsFor.T.Message]

    Permalink
  10. def PropsOf[A]: PropsBuilder[A]

    Permalink
  11. object Typed

    Permalink

    A shapeless-powered, typed variant of the actor/props creation.

    A shapeless-powered, typed variant of the actor/props creation. This is an alternative over constructors, that use the Class[A], Any* overload to create actors.

    You must use TypedActors and these actors must be case classes for this to work.

    Example:

    case class ExampleActor(foo: Option[String]) extends TypedActor.Of[String] {
      def typedReceive: TypedReceive = ???
    }
    
    // runtime error (IllegalArgumentException: no matching constructor found):
    val runtimeError: ActorRef[String] =
      ActorOf(PropsOf[String](classOf[ExampleActor1], "wrong type"))
    
    // compiletime error:
    //   found   : String("wrong type") :: HNil
    //   required: Option[String] :: HNil
    val compiletimeError: ActorRef[String] =
      Typed[ExampleActor2].create("wrong type")
    Usage

    Use apply with the TypedActor as the type parameter and then call either create or props with the appropriate constructor parameters to create either an ActorRef or a Props.

  12. val UntypedProps: Props.type

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped