Package com.facebook.thrift.transport

Examples of com.facebook.thrift.transport.TFramedTransport


      } else {
        TSocket socket = new TSocket(host, port);
        socket.setTimeout(socketTimeout);
        transport = socket;
        if (framed) {
          transport = new TFramedTransport(transport);
        } else if (header) {
          THeaderTransport htrans = new THeaderTransport(transport);
          htrans.addTransform(THeaderTransport.Transforms.ZLIB_TRANSFORM);
          // Test that decode works with multiple small blocks
          htrans.setZlibBufferSize(10);
View Full Code Here


      new ArrayList<THeaderTransport.ClientTypes>();
    prot = new THeaderProtocol(transport, clientTypes);
    if (header) {
      testClient(transport, prot); // Header w/compact
    }
    TFramedTransport framedTransport = new TFramedTransport(transport);
    prot = new TBinaryProtocol(framedTransport);
    if (framed) {
      testClient(transport, prot); // Framed
    }
  }
View Full Code Here

      new ArrayList<THeaderTransport.ClientTypes>();
    prot = new THeaderProtocol(transport, clientTypes);
    if (header) {
      testClient(transport, prot); // Header w/compact
    }
    TFramedTransport framedTransport = new TFramedTransport(transport);
    prot = new TBinaryProtocol(framedTransport);
    if (framed) {
      testClient(transport, prot); // Framed
    }
  }
View Full Code Here

    for (int i = 0; i < 3; ++i) {
      try {
        TSocket sock = new TSocket(host, port, 100, 500);
        sock.open();
        TFramedTransport trans = new TFramedTransport(sock);
        TBinaryProtocol proto = new TBinaryProtocol(trans);
        JavaSimpleService.Client cli = new JavaSimpleService.Client(proto);
        return cli;
      } catch (Exception e) {
        msg = e.toString();
View Full Code Here

  private static final int PORT = 19191;
  private static final int NUM_THREADS = 1;
  private static final int MAX_PENDING = 1;

  private static JavaSimpleService.Client newClient() throws Exception {
    TFramedTransport trans = new TFramedTransport(new TSocket(HOST, PORT));
    trans.open();
    return new JavaSimpleService.Client(new TBinaryProtocol(trans));
  }
View Full Code Here

        mbuf_protocol  = new TBinaryProtocol(mbuf_transport);
    }

    private void connectToThrudoc() throws TException {
        TSocket          socket    = new TSocket("localhost", THRUDOC_PORT );
        TFramedTransport transport = new TFramedTransport(socket);
        TBinaryProtocol  protocol  = new TBinaryProtocol(transport);
        
        thrudoc = new Thrudoc.Client(protocol);

        transport.open();
    }
View Full Code Here

        transport.open();
    }

    private void connectToThrudex() throws TException {
        TSocket          socket    = new TSocket("localhost", THRUDEX_PORT );
        TFramedTransport transport = new TFramedTransport(socket);
        TBinaryProtocol  protocol  = new TBinaryProtocol(transport);
        
        thrudex = new Thrudex.Client(protocol);

        transport.open();
    }
View Full Code Here

TOP

Related Classes of com.facebook.thrift.transport.TFramedTransport

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.