Package com.droidkit.actors

Examples of com.droidkit.actors.ActorScope


        // TODO: add path check

        Mailbox mailbox = new Mailbox(getQueue());
        UUID uuid = UUID.randomUUID();
        ActorRef ref = new ActorRef(actorSystem, this, uuid, path);
        ActorScope scope = new ActorScope(actorSystem, mailbox, ref, this, UUID.randomUUID(), path, props);

        synchronized (mailboxes) {
            mailboxes.put(mailbox, scope);
            scopes.put(scope.getPath(), scope);
            actorProps.put(path, props);
        }

        // Sending init message
        scope.getActorRef().send(StartActor.INSTANCE);
        return scope;
    }
View Full Code Here


    }

    @Override
    protected void dispatchMessage(Envelope envelope) {
        try {
            ActorScope actor = getMailboxActor(envelope.getMailbox());
            processEnvelope(envelope, actor);
        } finally {
            // TODO: better design
            getQueue().unlockMailbox(envelope.getMailbox());
        }
View Full Code Here

    }

    @Override
    protected void dispatchMessage(Envelope envelope) {
        try {
            ActorScope actor = getMailboxActor(envelope.getMailbox());
            processEnvelope(envelope, actor);
        } finally {
            // TODO: better design
            getQueue().unlockMailbox(envelope.getMailbox());
        }
View Full Code Here

TOP

Related Classes of com.droidkit.actors.ActorScope

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.