public static void main(String [] args) {
try {
CalculatorHandler handler = new CalculatorHandler();
Calculator.Processor processor = new Calculator.Processor(handler);
TServerTransport serverTransport = new TServerSocket(9090);
TServer server = new TSimpleServer(processor, serverTransport);
// Use this for a multithreaded server
// server = new TThreadPoolServer(processor, serverTransport);
System.out.println("Starting the server...");
server.serve();
} catch (Exception x) {
x.printStackTrace();
}
System.out.println("done.");