// validate that block-size has been set
if(line.hasOption(serverOption.getOpt())) {
if (!line.hasOption(portOption.getOpt())) {
throw new ParseException("the --port option must be specified");
}
// create and start the server
int port = ((Number)line.getOptionObject(portOption.getOpt())).intValue();
Server s = new Server(port);
LOG.debug("Starting SimplrRpc server...");
s.startServer();
} else if (line.hasOption(clientOption.getOpt())) {
if (!line.hasOption(portOption.getOpt()) || !line.hasOption(addrOption.getOpt())) {
throw new ParseException("the --port and --address options must be specified");
}
// create and start the client
int port = ((Number)line.getOptionObject(portOption.getOpt())).intValue();
String address = line.getOptionValue(addrOption.getOpt());