Package akka.actor

Class AbstractActor.Receive

  • Enclosing class:
    AbstractActor

    public static final class AbstractActor.Receive
    extends java.lang.Object
    Defines which messages the Actor can handle, along with the implementation of how the messages should be processed. You can build such behavior with the ReceiveBuilder but it can be implemented in other ways than using the ReceiveBuilder since it in the end is just a wrapper around a Scala PartialFunction. In Java, you can implement PartialFunction by extending AbstractPartialFunction.
    • Constructor Summary

      Constructors 
      Constructor Description
      Receive​(scala.PartialFunction<java.lang.Object,​scala.runtime.BoxedUnit> onMessage)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      scala.PartialFunction<java.lang.Object,​scala.runtime.BoxedUnit> onMessage()  
      AbstractActor.Receive orElse​(AbstractActor.Receive other)
      Composes this Receive with a fallback which gets applied where this partial function is not defined.
      • Methods inherited from class java.lang.Object

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

      • Receive

        public Receive​(scala.PartialFunction<java.lang.Object,​scala.runtime.BoxedUnit> onMessage)
    • Method Detail

      • onMessage

        public scala.PartialFunction<java.lang.Object,​scala.runtime.BoxedUnit> onMessage()