Examples of AbsMailboxesDispatcher


Examples of com.droidkit.actors.mailbox.AbsMailboxesDispatcher

            }

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

            AbsMailboxesDispatcher 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

Examples of com.droidkit.actors.mailbox.AbsMailboxesDispatcher

            if (scope != null) {
                return scope.getActorRef();
            }

            // Finding dispatcher for actor
            AbsMailboxesDispatcher mailboxesDispatcher;
            synchronized (dispatchers) {
                String dispatcherId = props.getDispatcher() == null ? DEFAULT_DISPATCHER : props.getDispatcher();
                if (!dispatchers.containsKey(dispatcherId)) {
                    throw new RuntimeException("Unknown dispatcherId '" + dispatcherId + "'");
                }
                mailboxesDispatcher = dispatchers.get(dispatcherId);
            }

            // Creating actor scope
            scope = new ActorScope(UUID.randomUUID(), path, props);

            // Connecting scope with dispatcher
            mailboxesDispatcher.connectScope(scope);
            // Sending initial message for creating actor
            mailboxesDispatcher.getQueue().putToQueue(new Envelope(StartActor.INSTANCE, scope.getMailbox(), null), ActorTime.currentTime());

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

            return scope.getActorRef();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.