Moved everything from Actor to ActorRef: akka-core compiles
This commit is contained in:
parent
6da1b07961
commit
4de5302804
16 changed files with 962 additions and 1051 deletions
|
|
@ -28,25 +28,22 @@ object Patterns {
|
|||
*/
|
||||
def loadBalancerActor(actors: => InfiniteIterator[ActorRef]): ActorRef =
|
||||
newActor(() => new Actor with LoadBalancer {
|
||||
start
|
||||
val seq = actors
|
||||
})
|
||||
}).start
|
||||
|
||||
/** Creates a Dispatcher given a routing and a message-transforming function
|
||||
*/
|
||||
def dispatcherActor(routing: PF[Any, ActorRef], msgTransformer: (Any) => Any): ActorRef =
|
||||
newActor(() => new Actor with Dispatcher {
|
||||
start
|
||||
override def transform(msg: Any) = msgTransformer(msg)
|
||||
def routes = routing
|
||||
})
|
||||
}).start
|
||||
|
||||
/** Creates a Dispatcher given a routing
|
||||
*/
|
||||
def dispatcherActor(routing: PF[Any, ActorRef]): ActorRef = newActor(() => new Actor with Dispatcher {
|
||||
start
|
||||
def routes = routing
|
||||
})
|
||||
}).start
|
||||
|
||||
/** Creates an actor that pipes all incoming messages to
|
||||
* both another actor and through the supplied function
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue