Package akka.pattern

Examples of akka.pattern.PromiseActorRef


    private PromiseActorRefPropertyExtractor() {
        super();
    }

    public Map<String, Object> extractProperties(ActorRef actorRef) {
        PromiseActorRef ref = (PromiseActorRef) actorRef;
        return Collections.<String, Object>singletonMap("local", Boolean.valueOf(ref.isLocal()));
    }
View Full Code Here


        super();
    }

    @Test
    public void testExtractProperties() {
        PromiseActorRef ref = createActorRef();
        Map<String, Object> result = PromiseActorRefPropertyExtractor.INSTANCE.extractProperties(ref);
        assertEquals("not the expected result", Collections.singletonMap("local", Boolean.TRUE), result);
    }
View Full Code Here

    private PromiseActorRef createActorRef() {
        ActorRefProvider refProvider = mock(ActorRefProvider.class, RETURNS_DEFAULTS);
        @SuppressWarnings("unchecked")
        Promise<Object> promise = mock(Promise.class, RETURNS_SMART_NULLS);

        PromiseActorRef ref = new PromiseActorRef(refProvider, promise);
        return ref;
    }
View Full Code Here

TOP

Related Classes of akka.pattern.PromiseActorRef

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.