twisted.names.test.test_server.NoResponseDNSServerFactory(server.DNSServerFactory) class documentationtwisted.names.test.test_server
(View In Hierarchy)
A server.DNSServerFactory
subclass which does not attempt to reply to any received messages.
Used for testing logged messages in messageReceived without
having to fake or patch the preceding code which attempts to deliver a 
response message.
| Method | allowQuery | Deny all queries. | 
| Method | sendReply | A noop send reply. | 
Inherited from DNSServerFactory:
| Instance Variable | cache | A Cacheinstance whosecacheResultmethod is called when a response is
received from one ofclients. Defaults toNoneif no caches are specified. Seecachesof__init__for more details. (type:CacheorNone) | 
| Instance Variable | canRecurse | A flag indicating whether this server is capable of performing recursive 
DNS resolution. (type: bool) | 
| Instance Variable | resolver | A resolve.ResolverChaincontaining an ordered list ofauthorities,cachesandclientsto which queries will be dispatched. (type:resolve.ResolverChain) | 
| Instance Variable | verbose | See __init__ | 
| Instance Variable | connections | A list of all the connected DNSProtocolinstances using this object as their controller. (type:listofDNSProtocolinstances) | 
| Instance Variable | protocol | A callable used for building a DNS stream protocol. Called by DNSServerFactory.buildProtocoland passed theDNSServerFactoryinstance as the one and only positional argument.  Defaults todns.DNSProtocol. (type:IProtocolFactoryconstructor) | 
| Method | __init__ | |
| Method | buildProtocol | Create an instance of a subclass of Protocol. | 
| Method | connectionMade | Track a newly connected DNSProtocol. | 
| Method | connectionLost | Stop tracking a no-longer connected DNSProtocol. | 
| Method | gotResolverResponse | A callback used by DNSServerFactory.handleQueryfor handling the deferred response fromself.resolver.query. | 
| Method | gotResolverError | A callback used by DNSServerFactory.handleQueryfor handling deferred errors fromself.resolver.query. | 
| Method | handleQuery | Called by DNSServerFactory.messageReceivedwhen a query message is received. | 
| Method | handleInverseQuery | Called by DNSServerFactory.messageReceivedwhen an inverse query message is received. | 
| Method | handleStatus | Called by DNSServerFactory.messageReceivedwhen a status message is received. | 
| Method | handleNotify | Called by DNSServerFactory.messageReceivedwhen a notify message is received. | 
| Method | handleOther | Called by DNSServerFactory.messageReceivedwhen a message with unrecognised OPCODE is received. | 
| Method | messageReceived | No summary | 
| Instance Variable | _messageFactory | A response message constructor with an initializer signature matching dns.Message.__init__. (type:callable) | 
| Method | _verboseLog | Log a message only if verbose logging is enabled. | 
| Method | _responseFromMessage | Generate a Messageinstance 
suitable for use as the response tomessage. | 
Inherited from Factory (via DNSServerFactory, ServerFactory):
| Class Method | forProtocol | Create a factory for the given protocol. | 
| Method | logPrefix | Describe this factory for log messages. | 
| Method | doStart | Make sure startFactory is called. | 
| Method | doStop | Make sure stopFactory is called. | 
| 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. | 
Deny all queries.
| Parameters | message | See server.DNSServerFactory.allowQuery | 
| protocol | See server.DNSServerFactory.allowQuery | |
| address | See server.DNSServerFactory.allowQuery | |
| Returns | False(type:bool) | |
A noop send reply.
| Parameters | protocol | See server.DNSServerFactory.sendReply | 
| message | See server.DNSServerFactory.sendReply | |
| address | See server.DNSServerFactory.sendReply |