Package org.apache.thrift.protocol

Examples of org.apache.thrift.protocol.TProtocolFactory


        protoName = "org.apache.thrift.protocol.TBinaryProtocol";
      }
      // For backward compatibility
      protoName = protoName.replace("com.facebook.thrift.protocol",
          "org.apache.thrift.protocol");
      TProtocolFactory protFactory = TReflectionUtils
          .getProtocolFactoryByName(protoName);
      bos_ = new ByteStream.Output();
      bis_ = new ByteStream.Input();
      tios = new TIOStreamTransport(bis_, bos_);

      oprot_ = protFactory.getProtocol(tios);
      iprot_ = protFactory.getProtocol(tios);

      /**
       * initialize the protocols
       */

 
View Full Code Here


            }

            logger.info(String.format("Binding thrift service to %s:%s", listenAddr, listenPort));

            // Protocol factory
            TProtocolFactory tProtocolFactory = new TBinaryProtocol.Factory(true,
                    true,
                    DatabaseDescriptor.getThriftMaxMessageLength());

            // Transport factory
            TTransportFactory inTransportFactory, outTransportFactory;
View Full Code Here

       
        if (logger.isDebugEnabled())
            logger.debug(String.format("Binding thrift service to %s:%s", listenAddr, listenPort));

        // Protocol factory
        TProtocolFactory tProtocolFactory = new TBinaryProtocol.Factory();
       
        // Transport factory
        TTransportFactory inTransportFactory, outTransportFactory;
        if (DatabaseDescriptor.isThriftFramed())
        {
View Full Code Here

            @Override
            public ChannelPipeline getPipeline()
                    throws Exception
            {
                ChannelPipeline cp = Channels.pipeline();
                TProtocolFactory inputProtocolFactory = def.getDuplexProtocolFactory().getInputProtocolFactory();
                cp.addLast("connectionLimiter", connectionLimiter);
                cp.addLast(ChannelStatistics.NAME, new ChannelStatistics(allChannels));
                cp.addLast("frameCodec", def.getThriftFrameCodecFactory().create(def.getMaxFrameSize(),
                                                                                 inputProtocolFactory));
                if (def.getClientIdleTimeout() != null) {
View Full Code Here

            @Override
            public ChannelPipeline getPipeline()
                    throws Exception
            {
                ChannelPipeline cp = Channels.pipeline();
                TProtocolFactory inputProtocolFactory = def.getDuplexProtocolFactory().getInputProtocolFactory();
                cp.addLast("connectionLimiter", connectionLimiter);
                cp.addLast(ChannelStatistics.NAME, new ChannelStatistics(allChannels));
                cp.addLast("frameCodec", def.getThriftFrameCodecFactory().create(def.getMaxFrameSize(),
                                                                                 inputProtocolFactory));
                if (def.getClientIdleTimeout() != null) {
View Full Code Here

        {
            this.clientDescription = clientDescription;
            this.channel = channel;
            this.methods = methods;

            TProtocolFactory protocolFactory = new TBinaryProtocol.Factory();
            this.in = protocolFactory;
            this.out = protocolFactory;
        }
View Full Code Here

        BasicThriftStruct tstruct = new BasicThriftStruct(
            new BigInteger(130, random).toString(),
            new BigInteger(130, random).toString(),
            new BigInteger(130, random).toString(),
            1337L);
        TProtocolFactory protocolFactory = new TBinaryProtocol.Factory();
        ByteArrayOutputStream oStream = new ByteArrayOutputStream();
        codecManager.write(BasicThriftStruct.class, oStream, protocolFactory);

        BasicThriftStruct tstructCopy = codecManager.read(
                oStream.toByteArray(),
View Full Code Here

       
        if (logger.isDebugEnabled())
            logger.debug(String.format("Binding thrift service to %s:%s", listenAddr, listenPort));

        // Protocol factory
        TProtocolFactory tProtocolFactory = new TBinaryProtocol.Factory();
       
        // Transport factory
        TTransportFactory inTransportFactory, outTransportFactory;
        if (DatabaseDescriptor.isThriftFramed())
        {
View Full Code Here

        }
       
        logger.info(String.format("Binding thrift service to %s:%s", listenAddr, listenPort));

        // Protocol factory
        TProtocolFactory tProtocolFactory = new TBinaryProtocol.Factory(true,
                                                                        true,
                                                                        DatabaseDescriptor.getThriftMaxMessageLength());
       
        // Transport factory
        TTransportFactory inTransportFactory, outTransportFactory;
View Full Code Here

            @Override
            public ChannelPipeline getPipeline()
                    throws Exception
            {
                ChannelPipeline cp = Channels.pipeline();
                TProtocolFactory inputProtocolFactory = def.getDuplexProtocolFactory().getInputProtocolFactory();
                cp.addLast("connectionLimiter", connectionLimiter);
                cp.addLast(ChannelStatistics.NAME, channelStatistics);
                cp.addLast("frameCodec", def.getThriftFrameCodecFactory().create(def.getMaxFrameSize(),
                                                                                 inputProtocolFactory));
                if (def.getClientIdleTimeout() != null) {
View Full Code Here

TOP

Related Classes of org.apache.thrift.protocol.TProtocolFactory

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.