'@see: L{ClientService.__init__}
@param log: The logger for the L{ClientService} instance this state
machine is associated to.
@type log: L{Logger}
@ivar _awaitingConnected: notifications to make when connection
succeeds, fails, or is cancelled
@type _awaitingConnected: list of (Deferred, count) tuples'

def __init__(self, endpoint, factory, retryPolicy, clock, log):

    self._endpoint = endpoint
    self._failedAttempts = 0
    self._stopped = False
    self._factory = factory
    self._timeoutForAttempt = retryPolicy
    self._clock = clock
    self._connectionInProgress = succeed(None)
    self._awaitingConnected = []
    self._stopWaiters = []
    self._log = log
