Interface Actor
-
- All Known Subinterfaces:
AbstractPersistentActorLike,ActorPublisher<T>,ActorSubscriber,AsyncWriteJournal,AsyncWriteProxy,AtLeastOnceDelivery,AtLeastOnceDeliveryLike,Consumer,Creators.Act,Creators.ActWithStash,DiagnosticActorLogging,DistributedPubSubMediator.Internal$.TopicLike,Eventsourced,FSM<S,D>,LeveldbCompaction,LeveldbIdMapping,LeveldbStore,LoggingFSM<S,D>,LoggingPersistentFSM<S,D,E>,Oneway,PersistenceStash,PersistentActor,PersistentFSM<S,D,E>,PersistentFSMBase<S,D,E>,Producer,ProducerSupport,ReceivePipeline,SnapshotStore,Snapshotter,Stash,Timers,UnboundedStash,UnrestrictedStash
- All Known Implementing Classes:
AbstractActor,AbstractActorPublisher,AbstractActorPublisherWithStash,AbstractActorPublisherWithUnboundedStash,AbstractActorPublisherWithUnrestrictedStash,AbstractActorSubscriber,AbstractActorWithStash,AbstractActorWithTimers,AbstractActorWithUnboundedStash,AbstractActorWithUnrestrictedStash,AbstractEventsByPersistenceIdPublisher,AbstractEventsByTagPublisher,AbstractFSM,AbstractFSMWithStash,AbstractLoggingActor,AbstractLoggingFSM,AbstractPersistentActor,AbstractPersistentActorWithAtLeastOnceDelivery,AbstractPersistentActorWithTimers,AbstractPersistentFSM,AbstractPersistentFSMBase,AbstractPersistentLoggingFSM,ActivationTracker,ActorAdapter,ActorClassificationUnsubscriber,ActorGraphInterpreter,ActorProcessorImpl,ActorRefSinkActor,ActorTransportAdapterManager,AdaptiveLoadBalancingMetricsListener,AkkaProtocolManager,AllPersistenceIdsPublisher,AsyncDnsManager,AsyncDnsResolver,AsyncWriteJournal,AsyncWriteJournal.Resequencer,AutoDown,AutoDownBase,BackoffOnRestartSupervisor,BackoffOnStopSupervisor,BackoffSupervisor,BarrierCoordinator,CamelSupervisor,CircuitBreakerProxy,ClientFSM,ClusterClient,ClusterCoreDaemon,ClusterCoreSupervisor,ClusterDaemon,ClusterDomainEventPublisher,ClusterHeartbeatReceiver,ClusterHeartbeatSender,ClusterMetricsCollector,ClusterMetricsSupervisor,ClusterReceptionist,ClusterReceptionist.Internal$.ClientResponseTunnel,ClusterRemoteWatcher,ClusterRouterGroupActor,ClusterRouterPoolActor,ClusterShardingGuardian,ClusterSingletonManager,ClusterSingletonManager.Internal$.OldestChangedBuffer,ClusterSingletonProxy,ConsumerRegistrar,Controller,CoordinatedShutdownLeave,CrossDcHeartbeatSender,CurrentEventsByPersistenceIdPublisher,CurrentEventsByTagPublisher,DDataShard,DDataShardCoordinator,DeadLetterListener,DefaultOSGiLogger,DistributedPubSubMediator,DnsClient,EndpointActor,EndpointManager,EndpointReader,EndpointWriter,EventStreamUnsubscriber,FanIn,FanOut,FanoutProcessorImpl,FileSubscriber,FirstSeedNodeProcess,FlushOnShutdown,InetAddressDnsResolver,InmemJournal,InputStreamPublisher,JavaLogger,JavaLogger,JoinSeedNodeProcess,JournalPerfSpec.BenchActor,LeveldbJournal,LiveEventsByPersistenceIdPublisher,LiveEventsByTagPublisher,LmdbDurableStore,LocalSnapshotStore,Logging.DefaultLogger,Main.Terminator,NoSnapshotStore,OnMemberStatusChangedListener,OutputStreamSubscriber,PersistencePluginProxy,PersistentShard,PersistentShardCoordinator,Player.Waiter,ProducerRegistrar,Props.EmptyActor,ProtocolStateActor,ReadAggregator,ReadWriteAggregator,RecoveryPermitter,Registry,ReliableDeliverySupervisor,ReliableProxy,ReliableProxy.Receiver,RememberEntityStarter,RemoteDeploymentWatcher,RemoteWatcher,Remoting.TransportSupervisor,RemoveInternalClusterShardingData,RemoveInternalClusterShardingData.RemoveOnePersistenceId,ReplayFilter,ReplayMediator,Replicator,ResizablePoolActor,RouterActor,RouterPoolActor,SelectionHandler,SelectionHandler.SelectorBasedManager,ServerFSM,Shard,ShardCoordinator,ShardCoordinator.RebalanceWorker,ShardRegion,ShardRegion.HandOffStopper,SharedLeveldbJournal,SharedLeveldbStore,SimpleDnsManager,Slf4jLogger,SnapshotStore,StreamSupervisor,TcpConnection,TcpDnsClient,TcpIncomingConnection,TcpListener,TcpManager,TcpOutgoingConnection,TestActor,TestActors.BlackholeActor,TestActors.EchoActor,TestActors.ForwardActor,TestEventListener,ThrottledAssociation,ThrottlerManager,TimerBasedThrottler,TLSActor,TypedActor$TypedActor,UdpConnectedManager,UdpConnection,UdpListener,UdpManager,UdpSender,UntypedAbstractActor,UntypedActor,UntypedActorPublisher,UntypedActorSubscriber,UntypedActorWithStash,UntypedActorWithUnboundedStash,UntypedActorWithUnrestrictedStash,UntypedConsumerActor,UntypedPersistentActor,UntypedPersistentActorWithAtLeastOnceDelivery,UntypedProducerActor,Unzip,WriteAggregator
public 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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classActor.emptyBehavior$emptyBehavior is a Receive-expression that matches no messages at all, ever.static classActor.ignoringBehavior$
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidakka$actor$Actor$_setter_$context_$eq(ActorContext x$1)voidakka$actor$Actor$_setter_$self_$eq(ActorRef x$1)The 'self' field holds the ActorRef for this actor.voidaroundPostRestart(java.lang.Throwable reason)INTERNAL API.voidaroundPostStop()INTERNAL API.voidaroundPreRestart(java.lang.Throwable reason, scala.Option<java.lang.Object> message)INTERNAL API.voidaroundPreStart()INTERNAL API.voidaroundReceive(scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receive, java.lang.Object msg)INTERNAL API.ActorContextcontext()Scala API: Stores the context for this actor, including self, and sender.voidpostRestart(java.lang.Throwable reason)User overridable callback: By default it callspreStart().voidpostStop()User overridable callback.voidpreRestart(java.lang.Throwable reason, scala.Option<java.lang.Object> message)Scala API: User overridable callback: '''By default it disposes of all children and then callspostStop().'''voidpreStart()User overridable callback.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.ActorRefself()The 'self' field holds the ActorRef for this actor.ActorRefsender()The reference sender Actor of the last received message.SupervisorStrategysupervisorStrategy()User overridable definition the strategy to use for supervising child actors.voidunhandled(java.lang.Object message)User overridable callback.
-
-
-
Method Detail
-
akka$actor$Actor$_setter_$context_$eq
void akka$actor$Actor$_setter_$context_$eq(ActorContext x$1)
-
akka$actor$Actor$_setter_$self_$eq
void akka$actor$Actor$_setter_$self_$eq(ActorRef x$1)
The 'self' field holds the ActorRef for this actor. Can be used to send messages to itself:self ! message
- Parameters:
x$1- (undocumented)
-
context
ActorContext context()
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!
ActorContextis the Scala API.getContextreturns aAbstractActor.ActorContext, which is the Java API of the actor context.- Returns:
- (undocumented)
-
self
ActorRef self()
The 'self' field holds the ActorRef for this actor. Can be used to send messages to itself:self ! message
- Returns:
- (undocumented)
-
sender
ActorRef sender()
The reference sender Actor of the last received message. Is defined if the message was sent from another Actor, elsedeadLettersinActorSystem.WARNING: Only valid within the Actor itself, so do not close over it and publish it to other threads!
- Returns:
- (undocumented)
-
receive
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.- Returns:
- (undocumented)
-
aroundReceive
void aroundReceive(scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receive, java.lang.Object msg)INTERNAL API.Can be overridden to intercept calls to this actor's current behavior.
- Parameters:
receive- current behavior.msg- current message.
-
aroundPreStart
void aroundPreStart()
INTERNAL API.Can be overridden to intercept calls to
preStart. CallspreStartby default.
-
aroundPostStop
void aroundPostStop()
INTERNAL API.Can be overridden to intercept calls to
postStop. CallspostStopby default.
-
aroundPreRestart
void aroundPreRestart(java.lang.Throwable reason, scala.Option<java.lang.Object> message)INTERNAL API.Can be overridden to intercept calls to
preRestart. CallspreRestartby default.- Parameters:
reason- (undocumented)message- (undocumented)
-
aroundPostRestart
void aroundPostRestart(java.lang.Throwable reason)
INTERNAL API.Can be overridden to intercept calls to
postRestart. CallspostRestartby default.- Parameters:
reason- (undocumented)
-
supervisorStrategy
SupervisorStrategy supervisorStrategy()
User overridable definition the strategy to use for supervising child actors.- Returns:
- (undocumented)
-
preStart
void preStart() throws java.lang.ExceptionUser overridable callback. Is called when an Actor is started. Actors are automatically started asynchronously when created. Empty default implementation.- Throws:
java.lang.Exception
-
postStop
void postStop() throws java.lang.ExceptionUser overridable callback. Is called asynchronously after 'actor.stop()' is invoked. Empty default implementation.- Throws:
java.lang.Exception
-
preRestart
void preRestart(java.lang.Throwable reason, scala.Option<java.lang.Object> message) throws java.lang.ExceptionScala API: User overridable callback: '''By default it disposes of all children and then callspostStop().'''- Parameters:
reason- the Throwable that caused the restart to happenmessage- optionally the current message the actor processed when failing, if applicable Is called on a crashed Actor right BEFORE it is restarted to allow clean up of resources before Actor is terminated.- Throws:
java.lang.Exception
-
postRestart
void postRestart(java.lang.Throwable reason) throws java.lang.ExceptionUser overridable callback: By default it callspreStart().- Parameters:
reason- the Throwable that caused the restart to happen Is called right AFTER restart on the newly created Actor to allow reinitialization after an Actor crash.- Throws:
java.lang.Exception
-
unhandled
void unhandled(java.lang.Object message)
User overridable callback. Is called when a message isn't handled by the current behavior of the actor by default it fails with either aDeathPactException(in case of an unhandledTerminatedmessage) or publishes anUnhandledMessageto the actor's system'sEventStream- Parameters:
message- (undocumented)
-
-