Package org.jdesktop.wonderland.common.messages.MessagePacker

Examples of org.jdesktop.wonderland.common.messages.MessagePacker.ReceivedMessage


        public void receivedMessage(ByteBuffer message) {
            Message m = null;
           
            try {
                ReceivedMessage rm = MessagePacker.unpack(message);
                m = rm.getMessage();
          
                // check the response
                assert m instanceof ResponseMessage : "Received invalid response " + m;
                assert m.getMessageID().equals(messageID) : "Bad ID in response " + m;
            } catch (PackerException pe) {
View Full Code Here


        Message message;
        short clientID;
       
        try {
            // read the message
            ReceivedMessage recv = MessagePacker.unpack(data, getClassLoader());
           
            // all set, just unpack the received message
            message = recv.getMessage();
            clientID = recv.getClientID();
        } catch (PackerException eme) {
            logger.log(Level.WARNING, "Error extracting message from server",
                       eme);

            // if possible, send an error reply to the client
View Full Code Here

     * @param data the message data
     */
    public void receivedMessage(ByteBuffer data) {
        try {
            // extract the message and client id
            ReceivedMessage recv = MessagePacker.unpack(data);
            Message m = recv.getMessage();
            short clientID = recv.getClientID();
           
            // find the handler
            ClientConnectionHandler handler = getHandler(clientID);
            if (handler == null) {
                logger.fine("Session " + getSession().getName() +
View Full Code Here

       
        // no wrapped session -- look for a ProtocolSelectionMessage
        try {
            // the message contains a client identifier in the first
            // 2 bytes, so ignore those
            ReceivedMessage recv = MessagePacker.unpack(data);
            Message m = recv.getMessage();
           
            // check the message type
            if (!(m instanceof ProtocolSelectionMessage)) {
                sendError(m, "Only ProtcolSelectionMessage allowed");
                return;
View Full Code Here

TOP

Related Classes of org.jdesktop.wonderland.common.messages.MessagePacker.ReceivedMessage

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.