Package com.droidkit.actors.mailbox

Examples of com.droidkit.actors.mailbox.AbsActorDispatcher


            }

            // Finding dispatcher for actor
            String dispatcherId = props.getDispatcher() == null ? DEFAULT_DISPATCHER : props.getDispatcher();

            AbsActorDispatcher mailboxesDispatcher;
            synchronized (dispatchers) {
                if (!dispatchers.containsKey(dispatcherId)) {
                    throw new RuntimeException("Unknown dispatcherId '" + dispatcherId + "'");
                }
                mailboxesDispatcher = dispatchers.get(dispatcherId);
            }

            // Creating actor scope
            scope = mailboxesDispatcher.createScope(path, props);

            // Saving actor in collection
            actors.put(path, scope);

            return scope.getActorRef();
View Full Code Here


     * @return ActorRef
     */
    public ActorRef actorOf(Props props, String path) {
        String dispatcherId = props.getDispatcher() == null ? DEFAULT_DISPATCHER : props.getDispatcher();

        AbsActorDispatcher mailboxesDispatcher;
        synchronized (dispatchers) {
            if (!dispatchers.containsKey(dispatcherId)) {
                throw new RuntimeException("Unknown dispatcherId '" + dispatcherId + "'");
            }
            mailboxesDispatcher = dispatchers.get(dispatcherId);
        }

        return mailboxesDispatcher.referenceActor(path, props);
    }
View Full Code Here

TOP

Related Classes of com.droidkit.actors.mailbox.AbsActorDispatcher

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.