class documentation

class RaisingDNSServerFactory(server.DNSServerFactory): (source)

View In Hierarchy

A server.DNSServerFactory subclass whose methods raise an exception containing the supplied arguments.

Used for stopping messageReceived and testing the arguments supplied to allowQuery.

Exception AllowQueryArguments Contains positional and keyword arguments in args.
Method allowQuery Raise the arguments supplied to allowQuery.

Inherited from DNSServerFactory:

Method __init__ No summary
Method buildProtocol Create an instance of a subclass of Protocol.
Method connectionLost Stop tracking a no-longer connected DNSProtocol.
Method connectionMade Track a newly connected DNSProtocol.
Method gotResolverError A callback used by DNSServerFactory.handleQuery for handling deferred errors from self.resolver.query.
Method gotResolverResponse A callback used by DNSServerFactory.handleQuery for handling the deferred response from self.resolver.query.
Method handleInverseQuery Called by DNSServerFactory.messageReceived when an inverse query message is received.
Method handleNotify Called by DNSServerFactory.messageReceived when a notify message is received.
Method handleOther Called by DNSServerFactory.messageReceived when a message with unrecognised OPCODE is received.
Method handleQuery Called by DNSServerFactory.messageReceived when a query message is received.
Method handleStatus Called by DNSServerFactory.messageReceived when a status message is received.
Method messageReceived DNSServerFactory.messageReceived is called by protocols which are under the control of this DNSServerFactory whenever they receive a DNS query message or an unexpected / duplicate / late DNS response message.
Method sendReply Send a response message to a given address via the supplied protocol.
Instance Variable cache A Cache instance whose cacheResult method is called when a response is received from one of clients. Defaults to None if no caches are specified. See caches of __init__ for more details.
Instance Variable canRecurse A flag indicating whether this server is capable of performing recursive DNS resolution.
Instance Variable connections A list of all the connected DNSProtocol instances using this object as their controller.
Instance Variable protocol A callable used for building a DNS stream protocol. Called by DNSServerFactory.buildProtocol and passed the DNSServerFactory instance as the one and only positional argument. Defaults to dns.DNSProtocol...
Instance Variable resolver A resolve.ResolverChain containing an ordered list of authorities, caches and clients to which queries will be dispatched.
Instance Variable verbose See __init__
Method _responseFromMessage Generate a Message instance suitable for use as the response to message.
Method _verboseLog Log a message only if verbose logging is enabled.
Instance Variable _messageFactory A response message constructor with an initializer signature matching dns.Message.__init__.

Inherited from Factory (via DNSServerFactory, ServerFactory):

Class Method forProtocol Create a factory for the given protocol.
Method doStart Make sure startFactory is called.
Method doStop Make sure stopFactory is called.
Method logPrefix Describe this factory for log messages.
Method startFactory This will be called before I begin listening on a Port or Connector.
Method stopFactory This will be called before I stop listening on all Ports/Connectors.
Class Variable noisy Undocumented
Instance Variable numPorts Undocumented
def allowQuery(self, *args, **kwargs): (source)

Raise the arguments supplied to allowQuery.

Parameters
*args:tuplePositional arguments which will be recorded in the raised exception.
**kwargs:dictKeyword args which will be recorded in the raised exception.