Package com.facebook.nifty.core

Examples of com.facebook.nifty.core.ThriftMessage


                return null;
            }

            // A non-zero MSB for the first byte of the message implies the message starts with a
            // protocol id (and thus it is unframed).
            return new ThriftMessage(messageBuffer,ThriftTransportType.UNFRAMED);
        } else if (buffer.readableBytes() < MESSAGE_FRAME_SIZE) {
            // Expecting a framed message, but not enough bytes available to read the frame size
            return null;
        } else {
            ChannelBuffer messageBuffer = tryDecodeFramedMessage(ctx, channel, buffer, true);

            if (messageBuffer == null) {
                return null;
            }

            // Messages with a zero MSB in the first byte are framed messages
            return new ThriftMessage(messageBuffer, ThriftTransportType.FRAMED);
        }
    }
View Full Code Here


                return null;
            }

            // A non-zero MSB for the first byte of the message implies the message starts with a
            // protocol id (and thus it is unframed).
            return new ThriftMessage(messageBuffer,ThriftTransportType.UNFRAMED);
        } else if (buffer.readableBytes() < MESSAGE_FRAME_SIZE) {
            // Expecting a framed message, but not enough bytes available to read the frame size
            return null;
        } else {
            ChannelBuffer messageBuffer = tryDecodeFramedMessage(ctx, channel, buffer, true);

            if (messageBuffer == null) {
                return null;
            }

            // Messages with a zero MSB in the first byte are framed messages
            return new ThriftMessage(messageBuffer, ThriftTransportType.FRAMED);
        }
    }
View Full Code Here

TOP

Related Classes of com.facebook.nifty.core.ThriftMessage

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.