Examples of ThriftNettyChannelBuffer


Examples of com.flipkart.phantom.runtime.impl.server.netty.channel.thrift.ThriftNettyChannelBuffer

   * Interface method implementation. Tries to read the Thrift protocol message. Returns null if unsuccessful, else returns the read byte array. Also
   * resets the {@link ChannelBuffer} reader index to nullify the effect of the read operation.
   * @see org.jboss.netty.handler.codec.replay.ReplayingDecoder#decode(org.jboss.netty.channel.ChannelHandlerContext, org.jboss.netty.channel.Channel, org.jboss.netty.buffer.ChannelBuffer, java.lang.Enum)
   */
  protected Object decode(ChannelHandlerContext ctx, Channel channel, ChannelBuffer buffer, VoidEnum voidEnum) throws Exception {
    ThriftNettyChannelBuffer ttransport = new ThriftNettyChannelBuffer(buffer, null); // we dont use the output buffer, so null is fine
    TProtocol iprot = this.protocolFactory.getProtocol(ttransport);
    int beginIndex = buffer.readerIndex();
    buffer.markReaderIndex();

      iprot.readMessageBegin();
View Full Code Here

Examples of com.flipkart.phantom.runtime.impl.server.netty.channel.thrift.ThriftNettyChannelBuffer

        if (MessageEvent.class.isAssignableFrom(event.getClass())) {

            // Prepare input and output
            ChannelBuffer input = (ChannelBuffer) ((MessageEvent) event).getMessage();
            ChannelBuffer output = ChannelBuffers.dynamicBuffer(responseSize);
            TTransport clientTransport = new ThriftNettyChannelBuffer(input, output);

            //Get command name
            ThriftNettyChannelBuffer ttransport = new ThriftNettyChannelBuffer(input, null);
            TProtocol iprot = this.protocolFactory.getProtocol(ttransport);
            input.markReaderIndex();
            TMessage message = iprot.readMessageBegin();
            input.resetReaderIndex();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.