Example usage for org.apache.thrift.transport TServerTransport accept

List of usage examples for org.apache.thrift.transport TServerTransport accept

Introduction

In this page you can find the example usage for org.apache.thrift.transport TServerTransport accept.

Prototype

public abstract TTransport accept() throws TTransportException;

Source Link

Document

Accept incoming connection on the server socket.

Usage

From source file:lizard.comms.thrift.ThriftServerAcceptFork.java

License:Apache License

public void server(TServerTransport serverTransport) {
    for (;;)//www  . ja va 2  s. com
        try {
            TTransport transport = serverTransport.accept();
            log.debug("Connection: " + transport);
            new Thread(() -> handler.handle(transport)).start();
        } catch (TException e) {
        } catch (Exception e) {
            e.printStackTrace();
        }
}