U  W[yã@s’dZddlmZmZddlmZmZmZddlm Z m Z ddl m Z Gdd„deƒZ Gdd „d eƒZee e ƒGd d „d eƒƒZd d „Zdd„ZdS)zT Plugin-based system for enumerating available reactors and installing one of them. é)Úabsolute_importÚdivision)Ú InterfaceÚ AttributeÚ implementer)ÚIPluginÚ getPlugins)ÚnamedAnyc@s(eZdZdZedƒZedƒZdd„ZdS)Ú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. cCsdS)z' Install this reactor. N©r r r ú>/usr/lib/python3/dist-packages/twisted/application/reactors.pyÚinstallszIReactorInstaller.installN)Ú__name__Ú __module__Ú __qualname__Ú__doc__rÚ shortNameÚ descriptionr r r r r r sr c@seZdZdZdS)Ú NoSuchReactorzT Raised when an attempt is made to install a reactor which cannot be found. N)rrrrr r r r r(src@s eZdZdZdd„Zdd„ZdS)ÚReactorz| @ivar moduleName: The fully-qualified Python name of the module of which the install callable is an attribute. cCs||_||_||_dS©N)rÚ moduleNamer)Úselfrrrr r r Ú__init__5szReactor.__init__cCst|jƒ ¡dSr)r rr )rr r r r ;szReactor.installN)rrrrrr r r r r r/srcCsttƒS)z= Return an iterator of L{IReactorInstaller} plugins. )rr r r r r ÚgetReactorTypes@srcCs>tƒD]*}|j|kr| ¡ddlm}|Sqt|ƒ‚dS)zß Install the reactor with the given C{shortName} attribute. @raise NoSuchReactor: If no reactor is found with a matching C{shortName}. @raise: anything that the specified reactor can raise when installed. r)ÚreactorN)rrr Ztwisted.internetrr)rZ installerrr r r ÚinstallReactorHs     rN)rZ __future__rrZzope.interfacerrrZtwisted.pluginrrZtwisted.python.reflectr r ÚKeyErrorrÚobjectrrrr r r r Ús