// args
int listenPort = args.length > 0 ? Integer.valueOf(args[0]) : 2012;
int threadCnt = args.length > 1 ? Integer.valueOf(args[1]) : 256;
RPCServer rpcServer = new DefaultRPCServer(listenPort, threadCnt, threadCnt);
ServerRPCProcessor serverRPCProcessor = new ServerRPCProcessor();
rpcServer.registerProcessor(serverRPCProcessor);
rpcServer.start();
}
catch (IOException e) {
e.printStackTrace();
}
}