'@param endpoint: A L{stream client endpoint
<interfaces.IStreamClientEndpoint>} provider which will be used to
connect when the service starts.
@param factory: A L{protocol factory <interfaces.IProtocolFactory>}
which will be used to create clients for the endpoint.
@param retryPolicy: A policy configuring how long L{ClientService} will
wait between attempts to connect to C{endpoint}.
@type retryPolicy: callable taking (the number of failed connection
attempts made in a row (L{int})) and returning the number of
seconds to wait before making another attempt.
@param clock: The clock used to schedule reconnection.  It\'s mainly
useful to be parametrized in tests.  If the factory is serialized,
this attribute will not be serialized, and the default value (the
reactor) will be restored when deserialized.
@type clock: L{IReactorTime}'

def __init__(self, endpoint, factory, retryPolicy=None, clock=None):

    clock = _maybeGlobalReactor(clock)
    retryPolicy = (_defaultPolicy if (retryPolicy is None) else retryPolicy)
    self._machine = _ClientMachine(endpoint, factory, retryPolicy, clock, log=self._log)
