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);
if (log.isDebugEnabled()) {