implemented Connection::getState()