akka.routing
Class FromConfig

java.lang.Object
  extended by akka.routing.FromConfig
All Implemented Interfaces:
Pool, RouterConfig, java.io.Serializable
Direct Known Subclasses:
FromConfig$

public class FromConfig
extends java.lang.Object
implements Pool

Java API: Router configuration which has no default, i.e. external configuration is required.

This can be used when the dispatcher to be used for the head Router needs to be configured (defaults to default-dispatcher).

See Also:
Serialized Form

Constructor Summary
FromConfig()
           
FromConfig(scala.Option<Resizer> resizer, SupervisorStrategy supervisorStrategy, java.lang.String routerDispatcher)
           
 
Method Summary
static FromConfig apply(scala.Option<Resizer> resizer, SupervisorStrategy supervisorStrategy, java.lang.String routerDispatcher)
           
 Router createRouter(ActorSystem system)
          Create the actual router, responsible for routing messages to routees.
 RouterActor createRouterActor()
          INTERNAL API
static FromConfig$ getInstance()
          Java API: get the singleton instance
 int nrOfInstances()
          Initial number of routee instances
 Props props()
          Props for a group router based on the settings defined by this instance.
 scala.Option<Resizer> resizer()
          Pool with dynamically resizable number of routees return the Resizer to use.
 java.lang.String routerDispatcher()
          Dispatcher ID to use for running the &ldquo;head&rdquo; actor, which handles supervision, death watch and router management messages
 SupervisorStrategy supervisorStrategy()
          SupervisorStrategy for the head actor, i.e.
static scala.Option<java.lang.String> unapply(FromConfig fc)
           
 void verifyConfig(ActorPath path)
          Check that everything is there which is needed.
 FromConfig withDispatcher(java.lang.String dispatcherId)
          Setting the dispatcher to be used for the router head actor, which handles supervision, death watch and router management messages.
 FromConfig withResizer(Resizer resizer)
          Setting the resizer to be used.
 FromConfig withSupervisorStrategy(SupervisorStrategy strategy)
          Setting the supervisor strategy to be used for the &ldquo;head&rdquo; Router actor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface akka.routing.Pool
enrichWithPoolDispatcher, newRoutee, props, stopRouterWhenAllRouteesRemoved, usePoolDispatcher
 
Methods inherited from interface akka.routing.RouterConfig
isManagementMessage, routingLogicController, withFallback
 

Constructor Detail

FromConfig

public FromConfig(scala.Option<Resizer> resizer,
                  SupervisorStrategy supervisorStrategy,
                  java.lang.String routerDispatcher)

FromConfig

public FromConfig()
Method Detail

getInstance

public static FromConfig$ getInstance()
Java API: get the singleton instance

Returns:
(undocumented)

apply

public static final FromConfig apply(scala.Option<Resizer> resizer,
                                     SupervisorStrategy supervisorStrategy,
                                     java.lang.String routerDispatcher)

unapply

public static final scala.Option<java.lang.String> unapply(FromConfig fc)

resizer

public scala.Option<Resizer> resizer()
Description copied from interface: Pool
Pool with dynamically resizable number of routees return the Resizer to use. The resizer is invoked once when the router is created, before any messages can be sent to it. Resize is also triggered when messages are sent to the routees, and the resizer is invoked asynchronously, i.e. not necessarily before the message has been sent.

Specified by:
resizer in interface Pool
Returns:
(undocumented)

supervisorStrategy

public SupervisorStrategy supervisorStrategy()
Description copied from interface: Pool
SupervisorStrategy for the head actor, i.e. for supervising the routees of the pool.

Specified by:
supervisorStrategy in interface Pool
Returns:
(undocumented)

routerDispatcher

public java.lang.String routerDispatcher()
Description copied from interface: RouterConfig
Dispatcher ID to use for running the &ldquo;head&rdquo; actor, which handles supervision, death watch and router management messages

Specified by:
routerDispatcher in interface RouterConfig
Returns:
(undocumented)

createRouter

public Router createRouter(ActorSystem system)
Description copied from interface: RouterConfig
Create the actual router, responsible for routing messages to routees.

Specified by:
createRouter in interface RouterConfig
Parameters:
system - the ActorSystem this router belongs to
Returns:
(undocumented)

createRouterActor

public RouterActor createRouterActor()
INTERNAL API

Specified by:
createRouterActor in interface Pool
Specified by:
createRouterActor in interface RouterConfig
Returns:
(undocumented)

verifyConfig

public void verifyConfig(ActorPath path)
Description copied from interface: RouterConfig
Check that everything is there which is needed. Called in constructor of RoutedActorRef to fail early.

Specified by:
verifyConfig in interface RouterConfig
Parameters:
path - (undocumented)

withSupervisorStrategy

public FromConfig withSupervisorStrategy(SupervisorStrategy strategy)
Setting the supervisor strategy to be used for the &ldquo;head&rdquo; Router actor.

Parameters:
strategy - (undocumented)
Returns:
(undocumented)

withResizer

public FromConfig withResizer(Resizer resizer)
Setting the resizer to be used.

Parameters:
resizer - (undocumented)
Returns:
(undocumented)

withDispatcher

public FromConfig withDispatcher(java.lang.String dispatcherId)
Setting the dispatcher to be used for the router head actor, which handles supervision, death watch and router management messages.

Parameters:
dispatcherId - (undocumented)
Returns:
(undocumented)

nrOfInstances

public int nrOfInstances()
Description copied from interface: Pool
Initial number of routee instances

Specified by:
nrOfInstances in interface Pool
Returns:
(undocumented)

props

public Props props()
Props for a group router based on the settings defined by this instance.

Returns:
(undocumented)