akka.routing
Class FromConfig

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

public class FromConfig
extends java.lang.Object
implements RouterConfig, scala.Serializable

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(java.lang.String routerDispatcher, SupervisorStrategy supervisorStrategy)
           
 
Method Summary
static FromConfig apply(java.lang.String routerDispatcher)
           
 scala.PartialFunction<scala.Tuple2<ActorRef,java.lang.Object>,scala.collection.immutable.Iterable<Destination>> createRoute(RouteeProvider routeeProvider)
          Implement the routing logic by returning a partial function of partial function from (sender, message) to a set of destinations.
static FromConfig$ getInstance()
          Java API: get the singleton instance
 java.lang.String routerDispatcher()
          Dispatcher ID to use for running the “head” actor, i.e.
 SupervisorStrategy supervisorStrategy()
          SupervisorStrategy for the created Router actor.
static scala.Option<java.lang.String> unapply(FromConfig fc)
           
 void verifyConfig(ActorPath path)
          Check that everything is there which is needed.
 FromConfig withSupervisorStrategy(SupervisorStrategy strategy)
          Java API for setting the supervisor strategy to be used for the “head” 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.RouterConfig
createActor, createRouteeProvider, resizer, stopRouterWhenAllRouteesRemoved, toAll, withFallback
 

Constructor Detail

FromConfig

public FromConfig(java.lang.String routerDispatcher,
                  SupervisorStrategy supervisorStrategy)

FromConfig

public FromConfig()
Method Detail

getInstance

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


apply

public static final FromConfig apply(java.lang.String routerDispatcher)

unapply

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

routerDispatcher

public java.lang.String routerDispatcher()
Description copied from interface: RouterConfig
Dispatcher ID to use for running the “head” actor, i.e. the Router.

Specified by:
routerDispatcher in interface RouterConfig

supervisorStrategy

public SupervisorStrategy supervisorStrategy()
Description copied from interface: RouterConfig
SupervisorStrategy for the created Router actor.

Specified by:
supervisorStrategy in interface RouterConfig

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

createRoute

public scala.PartialFunction<scala.Tuple2<ActorRef,java.lang.Object>,scala.collection.immutable.Iterable<Destination>> createRoute(RouteeProvider routeeProvider)
Description copied from interface: RouterConfig
Implement the routing logic by returning a partial function of partial function from (sender, message) to a set of destinations. This Route will be applied for each incoming message.

When createRoute is called the routees should also be registered, typically by using createRoutees or registerRouteesFor of the supplied RouteeProvider.

Specified by:
createRoute in interface RouterConfig

withSupervisorStrategy

public FromConfig withSupervisorStrategy(SupervisorStrategy strategy)
Java API for setting the supervisor strategy to be used for the “head” Router actor.