Examples of onSuccess()


Examples of akka.dispatch.Future.onSuccess()

        counter.tell("tick");
        counter.tell("tick");

        Future future = ask(counter, "get", 5000);

        future.onSuccess(new OnSuccess<Integer>() {
            public void onSuccess(Integer count) {
                System.out.println("Count is " + count);
            }
        });
View Full Code Here

Examples of com.corundumstudio.socketio.AckCallback.onSuccess()

        if (callback != null) {
            Object param = null;
            if (!packet.getArgs().isEmpty()) {
                param = packet.getArgs().get(0);
            }
            callback.onSuccess(param);
        }
    }

    private AckCallback removeCallback(UUID sessionId, long index) {
        AckEntry ackEntry = ackEntries.get(sessionId);
View Full Code Here

Examples of com.corundumstudio.socketio.AckCallback.onSuccess()

        if (callback != null) {
            Object param = null;
            if (!packet.getArgs().isEmpty()) {
                param = packet.getArgs().get(0);
            }
            callback.onSuccess(param);
        }
    }

    private AckCallback removeCallback(UUID sessionId, long index) {
        AckEntry ackEntry = ackEntries.get(sessionId);
View Full Code Here

Examples of com.corundumstudio.socketio.AckCallback.onSuccess()

        if (callback != null) {
            Object param = null;
            if (!packet.getArgs().isEmpty()) {
                param = packet.getArgs().get(0);
            }
            callback.onSuccess(param);
        }
    }

    private AckCallback removeCallback(UUID sessionId, long index) {
        AckEntry ackEntry = ackEntries.get(sessionId);
View Full Code Here

Examples of com.corundumstudio.socketio.AckCallback.onSuccess()

        AckCallback callback = removeCallback(client.getSessionId(), packet.getAckId());
        if (callback == null) {
            return;
        }
        if (callback instanceof MultiTypeAckCallback) {
            callback.onSuccess(new MultiTypeArgs(packet.getArgs()));
        } else {
            Object param = null;
            if (!packet.getArgs().isEmpty()) {
                param = packet.getArgs().get(0);
            }
View Full Code Here

Examples of com.corundumstudio.socketio.AckCallback.onSuccess()

            }
            if (packet.getArgs().size() > 1) {
                log.error("Wrong ack args amount. Should be only one argument, but current amount is: {}. Ack id: {}, sessionId: {}",
                        packet.getArgs().size(), packet.getAckId(), client.getSessionId());
            }
            callback.onSuccess(param);
        }
    }

    private AckCallback removeCallback(UUID sessionId, long index) {
        AckEntry ackEntry = ackEntries.get(sessionId);
View Full Code Here

Examples of com.google.common.util.concurrent.FutureCallback.onSuccess()

                State s = getStateMap().get(caller.state);
                assert s instanceof BlockState : "found " + s + " rather than a BlockState on the stack for " + caller.state;
                FutureCallback callback = caller.callback;
                assert callback != null : "no callback defined for " + caller.state;
                caller.callback = null;
                callback.onSuccess(null); // TODO should there be a way of passing a return value from the block?
                heads.put(thread, caller.id);
                try {
                    addingHead(new BlockEndNode<BlockStartNode>(this, newID(), /*TODO*/null, /* TODO is this right? or should it be from caller.id? */prior) {
                        @Override protected String getTypeDisplayName() {
                            return "Block end";
View Full Code Here

Examples of com.google.gwt.user.client.rpc.AsyncCallback.onSuccess()

                if (data.startsWith("$JSONSTART$") && data.endsWith("$JSONEND$")) {
                    dataToSend = JSONParser.parse(data.substring("$JSONSTART$".length(), data.length() - "$JSONEND$".length()));
                }

                callback.onSuccess(dataToSend);
            } catch (JSONException e) {
                callback.onFailure(e);
            }
        } else {
            alert("received event for a not subscribed topic: '" + topicName + "'");
View Full Code Here

Examples of com.google.gwt.user.client.rpc.AsyncCallback.onSuccess()

    expectLastCall().andAnswer(new IAnswer<Object>() {
      @Override
      public Object answer() throws Throwable {
        final Object[] arguments = getCurrentArguments();
        AsyncCallback callback = (AsyncCallback) arguments[arguments.length - 1];
        callback.onSuccess(1L);
        return null;
      }
    });   
  }
 
View Full Code Here

Examples of com.google.gwt.user.client.rpc.AsyncCallback.onSuccess()

    private static final class GetAsynchronousAnswer implements Answer<Void> {
        @Override
        @SuppressWarnings({"unchecked", "rawtypes"})
        public Void answer(InvocationOnMock invocation) throws Throwable {
            final AsyncCallback callback = (AsyncCallback) invocation.getArguments()[1];
            callback.onSuccess(invocation.getArguments()[0]);
            return null;
        }
    }

    /**
 
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.