akka.routing
Interface Router

All Superinterfaces:
Actor

public interface Router
extends Actor

Base trait for Router actors. Override receive to handle custom messages which the corresponding RouterConfig lets through by returning an empty route.


Nested Class Summary
static class Router.Resize$
           
 
Nested classes/interfaces inherited from interface akka.actor.Actor
Actor.emptyBehavior$
 
Method Summary
 SupervisorStrategy defaultSupervisorStrategy()
           
 void preRestart(java.lang.Throwable cause, scala.Option<java.lang.Object> msg)
          User overridable callback: '''By default it disposes of all children and then calls postStop().'''
 scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receive()
          This defines the initial actor behavior, it must return a partial function with the actor logic.
 akka.routing.RoutedActorCell ref()
           
 scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> routerReceive()
           
 
Methods inherited from interface akka.actor.Actor
context, noSender, postRestart, postStop, preStart, self, sender, supervisorStrategy, unhandled
 

Method Detail

defaultSupervisorStrategy

SupervisorStrategy defaultSupervisorStrategy()

ref

akka.routing.RoutedActorCell ref()

receive

scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receive()
Description copied from interface: Actor
This defines the initial actor behavior, it must return a partial function with the actor logic.

Specified by:
receive in interface Actor

routerReceive

scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> routerReceive()

preRestart

void preRestart(java.lang.Throwable cause,
                scala.Option<java.lang.Object> msg)
Description copied from interface: Actor
User overridable callback: '''By default it disposes of all children and then calls postStop().'''

Specified by:
preRestart in interface Actor
Parameters:
cause - the Throwable that caused the restart to happen
msg - 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.