Package org.gwtnode.dev.debug.message

Examples of org.gwtnode.dev.debug.message.Message


                proxySocket.onData(new StringOrBufferEventHandler() {
                    @Override
                    protected void onEvent() {
                        Buffer buffer = getBuffer();
                        proxyStream.append(buffer);
                        Message message;
                        do {
                            message = logMessage(proxyStream, true);
                            if (message != null) {
                                gwtCodeSocket.write(message.toBuffer());
                            }
                        } while (message != null);
                        //gwtCodeSocket.write(buffer);
                    }
                });
                gwtCodeSocket.onData(new StringOrBufferEventHandler() {
                    @Override
                    protected void onEvent() {
                        Buffer buffer = getBuffer();
                        gwtCodeStream.append(buffer);
                        Message message;
                        do {
                            message = logMessage(gwtCodeStream, false);
                            if (message != null) {
                                proxySocket.write(message.toBuffer());
                            }
                        } while (message != null);
                        //proxySocket.write(buffer);
                    }
                });
View Full Code Here


   
    private Message logMessage(BufferStream stream, boolean fromClient) {
        try {
            stream.beginTransaction();
            MessageType type = MessageType.getMessageType(stream);
            Message message = type.createMessage(stream, fromClient);
            if (logFile != null) {
                logFile.write((fromClient ? "fromJS ** " : "toJS ** ") + message.toString() + "\n");
            } else {
                Console.get().info((fromClient ? "fromJS ** " : "toJS ** ") + message.toString());
            }
            stream.commitTransaction();
            return message;
        } catch (StreamIndexOutOfBoundsException e) {
            stream.rollbackTransaction();
View Full Code Here

            protected void onEvent() {
                try {
                    session.getLog().debug("Got buffer");
                    stream.append(getBuffer());
                    //grab a message
                    Message message;
                    do {
                        message = getNextMessage();
                        if (message != null) {
                            if (session.getLog().isDebugEnabled()) {
                                session.getLog().debug("Received message: %s", message.toString());
                            }
                            handleMessage(message);
                        }
                    } while (message != null);
                    session.getLog().debug("Still have %d bytes available",
View Full Code Here

   
    private Message getNextMessage() {
        try {
            stream.beginTransaction();
            MessageType type = MessageType.getMessageType(stream);
            Message message = type.createMessage(stream, false);
            stream.commitTransaction();
            return message;
        } catch (StreamIndexOutOfBoundsException e) {
            stream.rollbackTransaction();
            return null;
View Full Code Here

TOP

Related Classes of org.gwtnode.dev.debug.message.Message

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.