Ë
    oj!	  ã                   óÎ   — d Z ddlmZmZ ddlmZmZmZ ddlm	Z	 ddl
mZmZ ddlmZ  G d„ de«      Z G d	„ d
e«      Z eee«       G d„ d«      «       Zdee   fd„Zdede	fd„Zy)zT
Plugin-based system for enumerating available reactors and installing one of
them.
é    )ÚIterableÚcast)Ú	AttributeÚ	InterfaceÚimplementer)ÚIReactorCore)ÚIPluginÚ
getPlugins)ÚnamedAnyc                   ó8   — e Zd ZdZ ed«      Z ed«      Zdd„Zy)ÚIReactorInstallerzB
    Definition of a reactor which can probably be installed.
    zE
    A brief string giving the user-facing name of this reactor.
    zK
    A longer string giving a user-facing description of this reactor.
    Nc                   ó   — y)z'
        Install this reactor.
        N© r   ó    ú>/usr/lib/python3/dist-packages/twisted/application/reactors.pyÚinstallzIReactorInstaller.install#   s   � r   ©ÚreturnN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Ú	shortNameÚdescriptionr   r   r   r   r   r      s.   „ ññ ð	ó€Iñ ð	ó€Kôr   r   c                   ó   — e Zd ZdZy)ÚNoSuchReactorzT
    Raised when an attempt is made to install a reactor which cannot be found.
    N)r   r   r   r   r   r   r   r   r   ,   s   „ òr   r   c                   ó,   — e Zd ZdZdededefd„Zdd„Zy)	ÚReactorz|
    @ivar moduleName: The fully-qualified Python name of the module of which
    the install callable is an attribute.
    r   Ú
moduleNamer   c                 ó.   — || _         || _        || _        y ©N)r   r   r   )Úselfr   r   r   s       r   Ú__init__zReactor.__init__9   s   € Ø"ˆŒØ$ˆŒØ&ˆÕr   Nc                 óJ   — t        | j                  «      j                  «        y r!   )r   r   r   )r"   s    r   r   zReactor.install>   s   € Ü�—‘Ó!×)Ñ)Õ+r   r   )r   r   r   r   Ústrr#   r   r   r   r   r   r   2   s&   „ ñð
' #ð '°3ð 'ÀSó 'ô
,r   r   r   c                  ó    — t        t        «      S )z=
    Return an iterator of L{IReactorInstaller} plugins.
    )r
   r   r   r   r   ÚgetReactorTypesr'   B   s   € ô Ô'Ó(Ð(r   r   c                 ó¤   — t        «       D ]9  }|j                  | k(  sŒ|j                  «        ddlm} t        t        |«      c S  t        | «      ‚)zé
    Install the reactor with the given C{shortName} attribute.

    @raise NoSuchReactor: If no reactor is found with a matching C{shortName}.

    @raise Exception: Anything that the specified reactor can raise when installed.
    r   )Úreactor)r'   r   r   Útwisted.internetr)   r   r   r   )r   Ú	installerr)   s      r   ÚinstallReactorr,   I   sM   € ô %Ó&ò /ˆ	Ø×Ñ )Ó+Ø×ÑÔÝ0äœ gÓ.Ò.ð/ô ˜	Ó
"Ð"r   N)r   Útypingr   r   Úzope.interfacer   r   r   Útwisted.internet.interfacesr   Útwisted.pluginr	   r
   Útwisted.python.reflectr   r   ÚKeyErrorr   r   r'   r%   r,   r   r   r   ú<module>r3      s|   ðñ
÷ "ç <Ñ <å 4ß .Ý +ô˜	ô ô4�Hô ñ ˆWÐ'Ó(÷,ð ,ó )ð,ð)˜Ð"3Ñ4ó )ð#˜cð # lô #r   