'Create a new L{Agent} that will use the endpoint factory to figure
out how to connect to the server.
@param reactor: A provider of
L{twisted.internet.interfaces.IReactorTime}.
@param endpointFactory: Used to construct endpoints which the
HTTP client will connect with.
@type endpointFactory: an L{IAgentEndpointFactory} provider.
@param pool: An L{HTTPConnectionPool} instance, or L{None}, in which
case a non-persistent L{HTTPConnectionPool} instance will be
created.
@type pool: L{HTTPConnectionPool}
@return: A new L{Agent}.'

@classmethod
def usingEndpointFactory(cls, reactor, endpointFactory, pool=None):

    agent = cls.__new__(cls)
    agent._init(reactor, endpointFactory, pool)
    return agent
