Package realityshard.container.network

Examples of realityshard.container.network.Message


           
            // failcheck
            if (filter == null) { buf.resetReaderIndex(); return; }
           
            // try create the message
            Message message;
            try
            {
                message = messageClazz.newInstance();
            }
            catch (InstantiationException | IllegalAccessException ex)
            {
                LOGGER.error("Could not create an instance of an message.", ex);
               
                buf.resetReaderIndex();
                return;
            }
           
            // dont forget to initialize the message
            message.init(ctx.channel());
           
            // try serialize the message
            if (!filter.deserialize(buf, message))
            {
                buf.resetReaderIndex();
                return;
            }
           
            // finally add the message
            result.add(message);
           
            LOGGER.debug("Got: {}", message.toString());
        }
    }
View Full Code Here

TOP

Related Classes of realityshard.container.network.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.