use of org.apache.thrift.transport.TNonblockingServerTransport in project lucida by claritylab.
the class QADaemon method main.
/**
* Entry point for question-answer.
* @param args the argument list. Provide port numbers
* for both sirius and qa.
*/
public static void main(String[] args) throws TTransportException, IOException, InterruptedException {
TProcessor proc = new LucidaService.AsyncProcessor(new QAServiceHandler.AsyncQAServiceHandler());
TNonblockingServerTransport transport = new TNonblockingServerSocket(8083);
TThreadedSelectorServer.Args arguments = new TThreadedSelectorServer.Args(transport).processor(proc).protocolFactory(new TBinaryProtocol.Factory()).transportFactory(new TFramedTransport.Factory());
final TThreadedSelectorServer server = new TThreadedSelectorServer(arguments);
System.out.println("QA at port 8083");
server.serve();
}
Aggregations