+
    Dfj                         R t ^ RIHt ^ RIHtHt ^ RIHtHtH	t	  ! R R4      t
]! ]P                  4       ! R R]P                  4      4       tR# )	z
Lookup a name using multiple resolvers.

Future Plans: This needs someway to specify which resolver answered
the query, or someway to specify (authority|ttl|cache behavior|more?)
)implementer)defer
interfaces)commondnserrorc                   ,   a  ] tR t^t o R tR tRtV tR# )FailureHandlerc                *    Wn         W n        W0n        R # N)resolverquerytimeout)selfr   r   r   s   &&&&7/usr/lib/python3/dist-packages/twisted/names/resolve.py__init__FailureHandler.__init__   s     
    c                    VP                  \        P                  \        P                  \
        4       V P                  V P                  V P                  4      # r   )	trapr   DomainErrorr   TimeoutErrorNotImplementedErrorr   r   r   )r   failures   &&r   __call__FailureHandler.__call__   s6    S__e&8&8:MN}}TZZ66r   )r   r   r   N)__name__
__module____qualname____firstlineno__r   r   __static_attributes____classdictcell____classdict__s   @r   r	   r	      s     
7 7r   r	   c                   :   a  ] tR t^t o RtR tR tRR ltRtV t	R# )ResolverChainz0
Lookup an address using multiple L{IResolver}s
c                P    \         P                  P                  V 4       Wn        R# )zQ
@type resolvers: L{list}
@param resolvers: A L{list} of L{IResolver} providers.
N)r   ResolverBaser   	resolvers)r   r(   s   &&r   r   ResolverChain.__init__%   s    
 	$$T*"r   c                l   V P                   '       g*   \        P                  ! \        P                  ! 4       4      # \
        P                  ! WV4      pV P                   ^ ,          P                  WT4      pV P                   R,           F(  pVP                  \        VP                  WT4      4      pK*  	  V# )a  
Build a L{dns.Query} for the given parameters and dispatch it
to each L{IResolver} in C{self.resolvers} until an answer or
L{error.AuthoritativeDomainError} is returned.

@type name: C{str}
@param name: DNS name to resolve.

@type type: C{int}
@param type: DNS record type.

@type cls: C{int}
@param cls: DNS record class.

@type timeout: Sequence of C{int}
@param timeout: Number of seconds after which to reissue the query.
    When the last timeout expires, the query is considered failed.

@rtype: L{Deferred}
@return: A L{Deferred} which fires with a three-tuple of lists of
    L{twisted.names.dns.RRHeader} instances.  The first element of the
    tuple gives answers.  The second element of the tuple gives
    authorities.  The third element of the tuple gives additional
    information.  The L{Deferred} may instead fail with one of the
    exceptions defined in L{twisted.names.error} or with
    C{NotImplementedError}.
   NN)
r(   r   failr   r   r   Queryr   
addErrbackr	   )r   nameclstyper   qdrs   &&&&&   r   _lookupResolverChain._lookup-   s    8 ~~~::e//122IId#&NN1##A/##A^AGGQ@AA $r   Nc                >   V P                   '       g*   \        P                  ! \        P                  ! 4       4      # V P                   ^ ,          P                  W4      pV P                   R,           F(  pVP                  \        VP
                  W4      4      pK*  	  V# )    r+   )r(   r   r-   r   r   lookupAllRecordsr/   r	   )r   r0   r   r4   r5   s   &&&  r   r:   ResolverChain.lookupAllRecordsQ   st    
 ~~~::e//122NN1..t=##A^A,>,>NOA $r   )r(   r   )
r   r   r   r   __doc__r   r6   r:   r    r!   r"   s   @r   r%   r%      s     #"H
 
r   r%   N)r<   zope.interfacer   twisted.internetr   r   twisted.namesr   r   r   r	   	IResolverr'   r%    r   r   <module>rB      sN   
 ' . , ,	7 	7 Z!!";F'' ; #;r   