protected boolean doHandleWireFormat(Packet packet) {
boolean handled = false;
if (packet.getPacketType() == Packet.WIRE_FORMAT_INFO) {
handled = true;
WireFormatInfo info = (WireFormatInfo) packet;
if (!canProcessWireFormatVersion(info.getVersion())) {
setPendingStop(true);
String errorStr = "Cannot process wire format of version: " + info.getVersion();
TransportStatusEvent event = new TransportStatusEvent();
event.setChannelStatus(TransportStatusEvent.FAILED);
fireStatusEvent(event);
onAsyncException(new UnsupportedWireFormatException(errorStr));
stop();
}
else {
if (log.isDebugEnabled()) {
log.debug(this + " using wire format version: " + info.getVersion());
}
}
}
return handled;
}