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 void
akka$actor$Actor$_setter_$context_$eq(ActorContext x$1)
Deprecated.protected void
akka$actor$Actor$_setter_$self_$eq(ActorRef x$1)
Deprecated.The 'self' field holds the ActorRef for this actor.ActorContext
context()
Deprecated.Scala API: Stores the context for this actor, including self, and sender.UntypedActorContext
getContext()
Deprecated.Returns this UntypedActor's UntypedActorContext The UntypedActorContext is not thread safe so do not expose it outside of the UntypedActor.ActorRef
getSelf()
Deprecated.Returns the ActorRef for this actor.ActorRef
getSender()
Deprecated.The reference sender Actor of the currently processed message.abstract void
onReceive(java.lang.Object message)
Deprecated.void
postRestart(java.lang.Throwable reason)
Deprecated.User overridable callback: By default it callspreStart()
.void
postStop()
Deprecated.User overridable callback.void
preRestart(java.lang.Throwable reason, scala.Option<java.lang.Object> message)
Deprecated.User overridable callback: '''By default it disposes of all children and then callspostStop()
.'''void
preStart()
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.ActorRef
self()
Deprecated.The 'self' field holds the ActorRef for this actor.SupervisorStrategy
supervisorStrategy()
Deprecated.User overridable definition the strategy to use for supervising child actors.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.-
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_$eq
in interfaceActor
-
akka$actor$Actor$_setter_$self_$eq
protected final void akka$actor$Actor$_setter_$self_$eq(ActorRef x$1)
Deprecated.Description copied from interface:Actor
The '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_$eq
in interfaceActor
- Parameters:
x$1
- (undocumented)
-
context
public ActorContext context()
Deprecated.Description copied from interface:Actor
Scala 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!
ActorContext
is the Scala API.getContext
returns 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.Throwable
Deprecated.- Throws:
java.lang.Throwable
-
postRestart
public void postRestart(java.lang.Throwable reason) throws java.lang.Exception
Deprecated.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:
postRestart
in interfaceActor
- Parameters:
reason
- (undocumented)- Throws:
java.lang.Exception
-
postStop
public void postStop() throws java.lang.Exception
Deprecated.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.Exception
Deprecated.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:
preRestart
in interfaceActor
- Parameters:
reason
- (undocumented)message
- (undocumented)- Throws:
java.lang.Exception
-
preStart
public void preStart() throws java.lang.Exception
Deprecated.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:Actor
Scala 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:Actor
The '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:
supervisorStrategy
in 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 unhandledTerminated
message) or publishes anUnhandledMessage
to the actor's system'sEventStream
.
-
-