processMessage();
state = state.nextState(currentInMessage.getMessage().getType());
if (state == ConnectionState.SendingAuthentication) {
PasswordMessage message = createPasswordMessage(currentInMessage.getMessage());
currentOutBuffer = message.toBytes();
}
currentInMessage = new ProtocolMessageBuffer();
}
}