Class

de.knutwalker.akka.typed.TypedActor

Of

Related Doc: package TypedActor

Permalink

abstract class Of[A] extends TypedActor

Abstract class to extend from in order to get a TypedActor. If you want to have the message type provided as a type parameter, you have to add a context bound for scala.reflect.ClassTag.

class ExampleActor extends TypeActor.Of[ExampleProtocol] {
  // ...
}
A

the message type this actor is receiving

Linear Supertypes
TypedActor, Actor, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Of
  2. TypedActor
  3. Actor
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Of()(implicit arg0: ClassTag[A])

    Permalink

Type Members

  1. final type Message = A

    Permalink
    Definition Classes
    OfTypedActor
  2. type Receive = PartialFunction[Any, Unit]

    Permalink
    Definition Classes
    Actor
  3. final type TypedReceive = PartialFunction[Message, Unit]

    Permalink
    Definition Classes
    TypedActor

Abstract Value Members

  1. abstract def typedReceive: TypedReceive

    Permalink

    Defines the actors behavior.

    Defines the actors behavior. Unlike akka.actor.Actor#receive, this one is typed in its first parameter.

    Definition Classes
    TypedActor

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def Total(f: (Message) ⇒ Unit)(implicit ct: ClassTag[Message]): TypedReceive

    Permalink

    Wraps a total receiver function and returns it as a TypedReceive.

    Wraps a total receiver function and returns it as a TypedReceive. Use this to get exhaustiveness checking for your receive block.

    // error: match may not be exhaustive. It would fail on the following inputs: None
    class ExampleActor extends TypedActor.Of[Option[String]] {
      def typedReceive: TypedReceive = Total {
        case Some("foo") ⇒
      }
    }
    Definition Classes
    TypedActor
  5. final def Untyped(f: Receive): TypedReceive

    Permalink

    Wraps an untyped receiver and returns it as a TypedReceive.

    Wraps an untyped receiver and returns it as a TypedReceive. Use this to match for messages that are outside of your protocol, e.g. akka.actor.Terminated.

    class ExampleActor extends TypedActor.Of[ExampleMessage] {
      def typedReceive: TypedReceive = Untyped {
        case Terminated(ref) => println(s"$$ref terminated")
      }
    }
    Definition Classes
    TypedActor
  6. def aroundPostRestart(reason: Throwable): Unit

    Permalink
    Attributes
    protected[akka]
    Definition Classes
    Actor
  7. def aroundPostStop(): Unit

    Permalink
    Attributes
    protected[akka]
    Definition Classes
    Actor
  8. def aroundPreRestart(reason: Throwable, message: Option[Any]): Unit

    Permalink
    Attributes
    protected[akka]
    Definition Classes
    Actor
  9. def aroundPreStart(): Unit

    Permalink
    Attributes
    protected[akka]
    Definition Classes
    Actor
  10. def aroundReceive(receive: akka.actor.Actor.Receive, msg: Any): Unit

    Permalink
    Attributes
    protected[akka]
    Definition Classes
    Actor
  11. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  12. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  13. implicit val context: ActorContext

    Permalink
    Definition Classes
    Actor
  14. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  15. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  16. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  18. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  19. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  20. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  21. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  22. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  23. def postRestart(reason: Throwable): Unit

    Permalink
    Definition Classes
    Actor
    Annotations
    @throws( classOf[java.lang.Exception] )
  24. def postStop(): Unit

    Permalink
    Definition Classes
    Actor
    Annotations
    @throws( classOf[java.lang.Exception] )
  25. def preRestart(reason: Throwable, message: Option[Any]): Unit

    Permalink
    Definition Classes
    Actor
    Annotations
    @throws( classOf[java.lang.Exception] )
  26. def preStart(): Unit

    Permalink
    Definition Classes
    Actor
    Annotations
    @throws( classOf[java.lang.Exception] )
  27. def receive: Receive

    Permalink

    TypedActors delegate to typedReceive.

    TypedActors delegate to typedReceive.

    Definition Classes
    TypedActor → Actor
    See also

    akka.actor.Actor#receive

  28. implicit final val self: akka.actor.ActorRef

    Permalink
    Definition Classes
    Actor
  29. final def sender(): akka.actor.ActorRef

    Permalink
    Definition Classes
    Actor
  30. def supervisorStrategy: SupervisorStrategy

    Permalink
    Definition Classes
    Actor
  31. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  32. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  33. final def typedBecome(f: TypedReceive): Unit

    Permalink

    Typed variant of context.become.

    Typed variant of context.become.

    Definition Classes
    TypedActor
  34. final val typedSelf: ActorRef[Message]

    Permalink

    Typed variant of self.

    Typed variant of self.

    Definition Classes
    TypedActor
  35. def unhandled(message: Any): Unit

    Permalink
    Definition Classes
    Actor
  36. final def untypedFromTyped(f: TypedReceive): Receive

    Permalink

    Wraps a typed receive and returns it as an untyped receive.

    Wraps a typed receive and returns it as an untyped receive. Use this only if you have to mix with other traits that override receive, where you need to repeat the implementation of this typed actors default receive method.

    Attributes
    protected
    Definition Classes
    TypedActor
  37. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from TypedActor

Inherited from Actor

Inherited from AnyRef

Inherited from Any

Ungrouped