Java Reference
In-Depth Information
valueOf(stringCommand.trim().toUpperCase());
} catch (IllegalArgumentException iae) {
return INVALID;
}
}
}
private void run() throws NamingException {
this.theatreInfo = lookupTheatreInfoEJB(); [4]
this.theatreBooker = lookupTheatreBookerEJB(); [5]
showWelcomeMessage(); [6]
while (true) {
final String stringCommand =
IOUtils.readLine("> ");
final Command command =
Command.parseCommand(stringCommand); [7]
switch (command) {
case BOOK:
handleBook();
break;
case LIST:
handleList();
break;
case MONEY:
handleMoney();
break;
case QUIT:
handleQuit();
break;
default:
logger.warning("Unknown command " +
stringCommand);
}
}
}
Search WWH ::




Custom Search