}
public void onCommand(Object o) {
Command command = (Command)o;
if (command.isWireFormatInfo()) {
WireFormatInfo info = (WireFormatInfo)command;
if (LOG.isDebugEnabled()) {
LOG.debug("Received WireFormat: " + info);
}
try {
wireInfoSentDownLatch.await();
if (LOG.isDebugEnabled()) {
LOG.debug(this + " before negotiation: " + wireFormat);
}
if (!info.isValid()) {
onException(new IOException("Remote wire format magic is invalid"));
} else if (info.getVersion() < minimumVersion) {
onException(new IOException("Remote wire format (" + info.getVersion() + ") is lower the minimum version required (" + minimumVersion + ")"));
}
wireFormat.renegotiateWireFormat(info);
Socket socket = next.narrow(Socket.class);
if (socket != null) {