Package org.jdesktop.wonderland.client.comms

Examples of org.jdesktop.wonderland.client.comms.ResponseListener


            return;
        }

        // TODO throttle sends, we should only send so many times a second.
        final CellMessage req = createMoveRequestMessage(transform);
        final ResponseListener resp = createMoveResponseListener(listener);

        throttle.schedule(new Runnable() {
            public void run() {
                //System.out.println("Sending move at " + System.currentTimeMillis());
                channelComp.send(req, resp);
View Full Code Here


                                                    transform);
    }

    protected ResponseListener createMoveResponseListener(final CellMoveModifiedListener listener) {
        if (listener == null) {
            return new ResponseListener() {
                public void responseReceived(ResponseMessage response) {
                    if (response instanceof ErrorMessage) {
                        ErrorMessage error = (ErrorMessage) response;
                        logger.log(Level.WARNING, "Error sending move: " +
                                   error.getErrorMessage(),
                                   error.getErrorCause());
                    }
                }
            };
        }

        return new ResponseListener() {
            public void responseReceived(ResponseMessage response) {
                CellTransform requestedTransform = null;
                CellTransform actualTransform = null;

                if (response instanceof MovableMessageResponse) {
View Full Code Here

TOP

Related Classes of org.jdesktop.wonderland.client.comms.ResponseListener

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.