LoggerUtils.logMsg(logger, envImpl,
formatter, Level.FINE,
"Acceptor: EOF on request");
continue;
}
RequestMessage requestMessage = null;
try {
requestMessage = protocol.parseRequest(requestLine);
} catch (InvalidMessageException e) {
LoggerUtils.logMsg(logger, envImpl,
formatter, Level.WARNING,
"Message format error: " +
e.getMessage());
out.println
(protocol.new ProtocolError(e).wireFormat());
continue;
}
ResponseMessage responseMessage = null;
if (requestMessage.getOp() == protocol.PROPOSE) {
responseMessage = process((Propose) requestMessage);
} else if (requestMessage.getOp() == protocol.ACCEPT) {
responseMessage = process((Accept) requestMessage);
} else if (requestMessage.getOp() == protocol.SHUTDOWN) {
break;
} else {
LoggerUtils.logMsg(logger, envImpl,
formatter, Level.SEVERE,
"Unrecognized request: " +