Package akka.actor
Class AbstractActor.Receive
- java.lang.Object
-
- akka.actor.AbstractActor.Receive
-
- Enclosing class:
- AbstractActor
public static final class AbstractActor.Receive extends java.lang.ObjectDefines which messages the Actor can handle, along with the implementation of how the messages should be processed. You can build such behavior with theReceiveBuilderbut it can be implemented in other ways than using theReceiveBuildersince it in the end is just a wrapper around a ScalaPartialFunction. In Java, you can implementPartialFunctionby extendingAbstractPartialFunction.
-
-
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.ReceiveorElse(AbstractActor.Receive other)Composes thisReceivewith a fallback which gets applied where this partial function is not defined.
-
-
-
Method Detail
-
onMessage
public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> onMessage()
-
orElse
public AbstractActor.Receive orElse(AbstractActor.Receive other)
Composes thisReceivewith a fallback which gets applied where this partial function is not defined.
-
-