Package org.apache.blur.thirdparty.thrift_0_9_0.transport

Examples of org.apache.blur.thirdparty.thrift_0_9_0.transport.TTransport


        public boolean process(final TProtocol inProt, final TProtocol outProt) throws TException {
            //populating request context
            ReqContext req_context = ReqContext.context();

            TTransport trans = inProt.getTransport();
            if (trans instanceof TMemoryInputTransport) {
                try {
                    req_context.setRemoteAddress(InetAddress.getLocalHost());
                } catch (UnknownHostException e) {
                    throw new RuntimeException(e);
View Full Code Here


            }           
            TSocket socket = new TSocket(host, port);
            if(timeout!=null) {
                socket.setTimeout(timeout);
            }
            final TTransport underlyingTransport = socket;

            //establish client-server transport via plugin
            _transport =  transportPlugin.connect(underlyingTransport, host);
        } catch (IOException ex) {
            throw new RuntimeException(ex);
View Full Code Here

        public boolean process(final TProtocol inProt, final TProtocol outProt) throws TException {
            //populating request context
            ReqContext req_context = ReqContext.context();

            TTransport trans = inProt.getTransport();
            //Sasl transport
            TSaslServerTransport saslTrans = (TSaslServerTransport)trans;

            //remote address
            TSocket tsocket = (TSocket)saslTrans.getUnderlyingTransport();
View Full Code Here

     * Connect to the specified server via framed transport
     * @param transport The underlying Thrift transport.
     */
    public TTransport connect(TTransport transport, String serverHost) throws TTransportException {
        //create a framed transport
        TTransport conn = new TFramedTransport(transport);

        //connect
        conn.open();
        LOG.debug("Simple client transport has been established");

        return conn;
    }
View Full Code Here

        public boolean process(final TProtocol inProt, final TProtocol outProt) throws TException {
            //populating request context
            ReqContext req_context = ReqContext.context();

            TTransport trans = inProt.getTransport();
            if (trans instanceof TMemoryInputTransport) {
                try {
                    req_context.setRemoteAddress(InetAddress.getLocalHost());
                } catch (UnknownHostException e) {
                    throw new RuntimeException(e);
View Full Code Here

            }           
            TSocket socket = new TSocket(host, port);
            if(timeout!=null) {
                socket.setTimeout(timeout);
            }
            final TTransport underlyingTransport = socket;

            //establish client-server transport via plugin
            _transport =  transportPlugin.connect(underlyingTransport, host);
        } catch (IOException ex) {
            throw new RuntimeException(ex);
View Full Code Here

   *            The underlying Thrift transport.
   */
  public TTransport connect(TTransport transport, String serverHost)
      throws TTransportException {
    // create a framed transport
    TTransport conn = new TFramedTransport(transport);

    // connect
    conn.open();
    LOG.debug("Simple client transport has been established");

    return conn;
  }
View Full Code Here

    public boolean process(final TProtocol inProt, final TProtocol outProt)
        throws TException {
      // populating request context
      ReqContext req_context = ReqContext.context();

      TTransport trans = inProt.getTransport();
      if (trans instanceof TMemoryInputTransport) {
        try {
          req_context.setRemoteAddress(InetAddress.getLocalHost());
        } catch (UnknownHostException e) {
          throw new RuntimeException(e);
View Full Code Here

//      /***************only test for daily *************/
      TSocket socket = new TSocket(host, port);
      if (timeout != null) {
        socket.setTimeout(timeout);
      }
      final TTransport underlyingTransport = socket;

      // establish client-server transport via plugin
      _transport = transportPlugin.connect(underlyingTransport, host);
    } catch (IOException ex) {
      throw new RuntimeException("Create transport error");
View Full Code Here

    public boolean process(final TProtocol inProt, final TProtocol outProt)
        throws TException {
      // populating request context
      ReqContext req_context = ReqContext.context();

      TTransport trans = inProt.getTransport();
      // Sasl transport
      TSaslServerTransport saslTrans = (TSaslServerTransport) trans;

      // remote address
      TSocket tsocket = (TSocket) saslTrans.getUnderlyingTransport();
View Full Code Here

TOP

Related Classes of org.apache.blur.thirdparty.thrift_0_9_0.transport.TTransport

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.