Package akka.actor
Class UntypedAbstractActor
- java.lang.Object
-
- akka.actor.AbstractActor
-
- akka.actor.UntypedAbstractActor
-
- All Implemented Interfaces:
Actor
public abstract class UntypedAbstractActor extends AbstractActor
To be implemented by concrete UntypedAbstractActor, this defines the behavior of the actor.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class akka.actor.AbstractActor
AbstractActor.ActorContext, AbstractActor.Receive
-
Nested classes/interfaces inherited from interface akka.actor.Actor
Actor.emptyBehavior$, Actor.ignoringBehavior$
-
-
Constructor Summary
Constructors Constructor Description UntypedAbstractActor()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description AbstractActor.ReceivecreateReceive()An actor has to define its initial receive behavior by implementing thecreateReceivemethod.abstract voidonReceive(java.lang.Object message)To be implemented by concrete UntypedAbstractActor, this defines the behavior of the actor.scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit>receive()Scala API: This defines the initial actor behavior, it must return a partial function with the actor logic.voidunhandled(java.lang.Object message)Recommended convention is to call this method if the message isn't handled inonReceive(java.lang.Object)(e.g.-
Methods inherited from class akka.actor.AbstractActor
akka$actor$Actor$_setter_$context_$eq, akka$actor$Actor$_setter_$self_$eq, context, emptyBehavior, getContext, getSelf, getSender, postRestart, postStop, preRestart, preRestart, preStart, receiveBuilder, self, supervisorStrategy
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface akka.actor.Actor
aroundPostRestart, aroundPostStop, aroundPreRestart, aroundPreStart, aroundReceive, sender
-
-
-
-
Method Detail
-
createReceive
public final AbstractActor.Receive createReceive()
Description copied from class:AbstractActorAn actor has to define its initial receive behavior by implementing thecreateReceivemethod.- Specified by:
createReceivein classAbstractActor- Returns:
- (undocumented)
-
onReceive
public abstract void onReceive(java.lang.Object message) throws java.lang.ThrowableTo be implemented by concrete UntypedAbstractActor, this defines the behavior of the actor.- Parameters:
message- (undocumented)- Throws:
java.lang.Throwable
-
receive
public scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receive()
Description copied from interface:ActorScala API: This defines the initial actor behavior, it must return a partial function with the actor logic.- Specified by:
receivein interfaceActor- Overrides:
receivein classAbstractActor- Returns:
- (undocumented)
-
unhandled
public void unhandled(java.lang.Object message)
Recommended convention is to call this method if the message isn't handled inonReceive(java.lang.Object)(e.g. unknown message type). By default it fails with either aDeathPactException(in case of an unhandledTerminatedmessage) or publishes anUnhandledMessageto the actor's system'sEventStream.- Parameters:
message- (undocumented)
-
-