Ϫf! dZddlmZmZddlmZmZmZddlm Z ddl m Z m Z ddl mZGddeZGd d eZee eGd d Zd eefdZded e fdZy)zT Plugin-based system for enumerating available reactors and installing one of them. )Iterablecast) Attribute Interface implementer) IReactorCore)IPlugin getPlugins)namedAnyc8eZdZdZedZedZddZy)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. Ncy)z' Install this reactor. Nr>/usr/lib/python3/dist-packages/twisted/application/reactors.pyinstallzIReactorInstaller.install#srreturnN)__name__ __module__ __qualname____doc__r shortName descriptionrrrrr r s. I  K  rr ceZdZdZy) NoSuchReactorzT Raised when an attempt is made to install a reactor which cannot be found. N)rrrrrrrrr,srrc,eZdZdZdededefdZddZy) Reactorz| @ivar moduleName: The fully-qualified Python name of the module of which the install callable is an attribute. r moduleNamerc.||_||_||_yN)rrr)selfrrrs r__init__zReactor.__init__9s"$&rNcJt|jjyr!)r rr)r"s rrzReactor.install>s!))+rr)rrrrstrr#rrrrrr2s& '#'3'S' ,rrrc ttS)z= Return an iterator of L{IReactorInstaller} plugins. )r r rrrgetReactorTypesr'Bs ' ((rrctD]9}|j|k(s|jddlm}t t |cSt|)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'rrtwisted.internetr)rrr)r installerr)s rinstallReactorr,IsM%&/   ) +     0 g. . /  ""rN)rtypingrrzope.interfacerrrtwisted.internet.interfacesrtwisted.pluginr r twisted.python.reflectr r KeyErrorrrr'r%r,rrrr3s| "<<4.+  4H  W'( , ,) ,)"34)#c#l#r