Package akka.actor
Class UntypedActor
- java.lang.Object
-
- akka.actor.UntypedActor
-
- All Implemented Interfaces:
Actor
- Direct Known Subclasses:
UntypedActorPublisher,UntypedActorSubscriber,UntypedActorWithStash,UntypedActorWithUnboundedStash,UntypedActorWithUnrestrictedStash,UntypedConsumerActor,UntypedPersistentActor,UntypedProducerActor
public abstract class UntypedActor extends java.lang.Object implements Actor
Deprecated.Use AbstractActor instead of UntypedActor. Since 2.5.0.To be implemented by concrete UntypedActor, this defines the behavior of the UntypedActor.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface akka.actor.Actor
Actor.emptyBehavior$, Actor.ignoringBehavior$
-
-
Constructor Summary
Constructors Constructor Description UntypedActor()Deprecated.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidakka$actor$Actor$_setter_$context_$eq(ActorContext x$1)Deprecated.protected voidakka$actor$Actor$_setter_$self_$eq(ActorRef x$1)Deprecated.The 'self' field holds the ActorRef for this actor.ActorContextcontext()Deprecated.Scala API: Stores the context for this actor, including self, and sender.UntypedActorContextgetContext()Deprecated.Returns this UntypedActor's UntypedActorContext The UntypedActorContext is not thread safe so do not expose it outside of the UntypedActor.ActorRefgetSelf()Deprecated.Returns the ActorRef for this actor.ActorRefgetSender()Deprecated.The reference sender Actor of the currently processed message.abstract voidonReceive(java.lang.Object message)Deprecated.voidpostRestart(java.lang.Throwable reason)Deprecated.User overridable callback: By default it callspreStart().voidpostStop()Deprecated.User overridable callback.voidpreRestart(java.lang.Throwable reason, scala.Option<java.lang.Object> message)Deprecated.User overridable callback: '''By default it disposes of all children and then callspostStop().'''voidpreStart()Deprecated.User overridable callback.scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit>receive()Deprecated.Scala API: This defines the initial actor behavior, it must return a partial function with the actor logic.ActorRefself()Deprecated.The 'self' field holds the ActorRef for this actor.SupervisorStrategysupervisorStrategy()Deprecated.User overridable definition the strategy to use for supervising child actors.voidunhandled(java.lang.Object message)Deprecated.Recommended convention is to call this method if the message isn't handled inonReceive(java.lang.Object)(e.g.-
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
-
akka$actor$Actor$_setter_$context_$eq
protected void akka$actor$Actor$_setter_$context_$eq(ActorContext x$1)
Deprecated.- Specified by:
akka$actor$Actor$_setter_$context_$eqin interfaceActor
-
akka$actor$Actor$_setter_$self_$eq
protected final void akka$actor$Actor$_setter_$self_$eq(ActorRef x$1)
Deprecated.Description copied from interface:ActorThe 'self' field holds the ActorRef for this actor. Can be used to send messages to itself:self ! message
- Specified by:
akka$actor$Actor$_setter_$self_$eqin interfaceActor- Parameters:
x$1- (undocumented)
-
context
public ActorContext context()
Deprecated.Description copied from interface:ActorScala API: Stores the context for this actor, including self, and sender. It is implicit to support operations such asforward.WARNING: Only valid within the Actor itself, so do not close over it and publish it to other threads!
ActorContextis the Scala API.getContextreturns aAbstractActor.ActorContext, which is the Java API of the actor context.
-
getContext
public UntypedActorContext getContext()
Deprecated.Returns this UntypedActor's UntypedActorContext The UntypedActorContext is not thread safe so do not expose it outside of the UntypedActor.- Returns:
- (undocumented)
-
getSelf
public ActorRef getSelf()
Deprecated.Returns the ActorRef for this actor.- Returns:
- (undocumented)
-
getSender
public ActorRef getSender()
Deprecated.The reference sender Actor of the currently processed message. This is always a legal destination to send to, even if there is no logical recipient for the reply, in which case it will be sent to the dead letter mailbox.- Returns:
- (undocumented)
-
onReceive
public abstract void onReceive(java.lang.Object message) throws java.lang.ThrowableDeprecated.- Throws:
java.lang.Throwable
-
postRestart
public void postRestart(java.lang.Throwable reason) throws java.lang.ExceptionDeprecated.User overridable callback: By default it callspreStart(). Is called right AFTER restart on the newly created Actor to allow reinitialization after an Actor crash.- Specified by:
postRestartin interfaceActor- Parameters:
reason- (undocumented)- Throws:
java.lang.Exception
-
postStop
public void postStop() throws java.lang.ExceptionDeprecated.User overridable callback. Is called asynchronously after 'actor.stop()' is invoked. Empty default implementation.
-
preRestart
public void preRestart(java.lang.Throwable reason, scala.Option<java.lang.Object> message) throws java.lang.ExceptionDeprecated.User overridable callback: '''By default it disposes of all children and then callspostStop().''' Is called on a crashed Actor right BEFORE it is restarted to allow clean up of resources before Actor is terminated.- Specified by:
preRestartin interfaceActor- Parameters:
reason- (undocumented)message- (undocumented)- Throws:
java.lang.Exception
-
preStart
public void preStart() throws java.lang.ExceptionDeprecated.User overridable callback. Is called when an Actor is started. Actor are automatically started asynchronously when created. Empty default implementation.
-
receive
public final scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receive()
Deprecated.Description copied from interface:ActorScala API: This defines the initial actor behavior, it must return a partial function with the actor logic.
-
self
public final ActorRef self()
Deprecated.Description copied from interface:ActorThe 'self' field holds the ActorRef for this actor. Can be used to send messages to itself:self ! message
-
supervisorStrategy
public SupervisorStrategy supervisorStrategy()
Deprecated.User overridable definition the strategy to use for supervising child actors.- Specified by:
supervisorStrategyin interfaceActor- Returns:
- (undocumented)
-
unhandled
public void unhandled(java.lang.Object message)
Deprecated.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.
-
-