Search in sources :

Example 1 with Args

use of org.apache.thrift.server.TServer.Args in project HackTutorial by linrongbin16.

the class Server method main.

public static void main(String[] args) throws Exception {
    ServerSocket socket = new ServerSocket(30003);
    TServerSocket serverTransport = new TServerSocket(socket);
    Basic.BasicService.Processor processor = new Basic.BasicService.Processor(new BasicServiceImpl());
    TServer server = new TSimpleServer(new Args(serverTransport).processor(processor));
    System.out.println("Server Starting...");
    server.serve();
}
Also used : TServerSocket(org.apache.thrift.transport.TServerSocket) Args(org.apache.thrift.server.TServer.Args) TServer(org.apache.thrift.server.TServer) ServerSocket(java.net.ServerSocket) TServerSocket(org.apache.thrift.transport.TServerSocket) TSimpleServer(org.apache.thrift.server.TSimpleServer)

Aggregations

ServerSocket (java.net.ServerSocket)1 TServer (org.apache.thrift.server.TServer)1 Args (org.apache.thrift.server.TServer.Args)1 TSimpleServer (org.apache.thrift.server.TSimpleServer)1 TServerSocket (org.apache.thrift.transport.TServerSocket)1