'@type resolver: L{IResolver <twisted.internet.interfaces.IResolver>}
provider or L{None}
@param: A resolver.
@type clock: L{IReactorTime <twisted.internet.interfaces.IReactorTime>}
provider or L{None}
@param clock: A reactor which will be used to schedule timeouts.'

def __init__(self, resolver=None, clock=None):

    self.badMXs = {}
    if (resolver is None):
        from twisted.names.client import createResolver
        resolver = createResolver()
    self.resolver = resolver
    if (clock is None):
        from twisted.internet import reactor as clock
    self.clock = clock
