diff --git twisted/application/reactors.py twisted/application/reactors.py
index 203e3a5..6bae985 100644
|
|
|
|
| 7 | 7 | them. |
| 8 | 8 | """ |
| 9 | 9 | |
| 10 | | from zope.interface import Interface, Attribute, implementer |
| | 10 | from zope.interface import Interface, Attribute, implements |
| 11 | 11 | |
| 12 | 12 | from twisted.plugin import IPlugin, getPlugins |
| 13 | 13 | from twisted.python.reflect import namedAny |
| … |
… |
|
| 41 | 41 | """ |
| 42 | 42 | |
| 43 | 43 | |
| 44 | | @implementer(IPlugin, IReactorInstaller) |
| 45 | 44 | class Reactor(object): |
| 46 | 45 | """ |
| 47 | 46 | @ivar moduleName: The fully-qualified Python name of the module of which |
| 48 | 47 | the install callable is an attribute. |
| 49 | 48 | """ |
| | 49 | implements(IPlugin, IReactorInstaller) |
| 50 | 50 | |
| 51 | 51 | |
| 52 | 52 | def __init__(self, shortName, moduleName, description): |
diff --git twisted/application/service.py twisted/application/service.py
index fb47943..66fef85 100644
|
|
|
|
| 13 | 13 | Maintainer: Moshe Zadka |
| 14 | 14 | """ |
| 15 | 15 | |
| 16 | | from zope.interface import implementer, Interface, Attribute |
| | 16 | from zope.interface import implements, Interface, Attribute |
| 17 | 17 | |
| 18 | 18 | from twisted.python.reflect import namedAny |
| 19 | 19 | from twisted.python import components |
| … |
… |
|
| 56 | 56 | |
| 57 | 57 | |
| 58 | 58 | |
| 59 | | @implementer(IPlugin, IServiceMaker) |
| 60 | 59 | class ServiceMaker(object): |
| 61 | 60 | """ |
| 62 | 61 | Utility class to simplify the definition of L{IServiceMaker} plugins. |
| 63 | 62 | """ |
| | 63 | implements(IPlugin, IServiceMaker) |
| 64 | 64 | |
| 65 | 65 | def __init__(self, name, module, description, tapname): |
| 66 | 66 | self.name = name |
| … |
… |
|
| 152 | 152 | """ |
| 153 | 153 | |
| 154 | 154 | |
| 155 | | @implementer(IService) |
| 156 | 155 | class Service: |
| 157 | 156 | """ |
| 158 | 157 | Base class for services. |
| … |
… |
|
| 162 | 161 | as not serializing this book-keeping information. |
| 163 | 162 | """ |
| 164 | 163 | |
| | 164 | implements(IService) |
| | 165 | |
| 165 | 166 | running = 0 |
| 166 | 167 | name = None |
| 167 | 168 | parent = None |
| … |
… |
|
| 253 | 254 | |
| 254 | 255 | |
| 255 | 256 | |
| 256 | | @implementer(IServiceCollection) |
| 257 | 257 | class MultiService(Service): |
| 258 | 258 | """ |
| 259 | 259 | Straightforward Service Container. |
| … |
… |
|
| 264 | 264 | will finish. |
| 265 | 265 | """ |
| 266 | 266 | |
| | 267 | implements(IServiceCollection) |
| | 268 | |
| 267 | 269 | def __init__(self): |
| 268 | 270 | self.services = [] |
| 269 | 271 | self.namedServices = {} |
| … |
… |
|
| 345 | 347 | |
| 346 | 348 | |
| 347 | 349 | |
| 348 | | @implementer(IProcess) |
| 349 | 350 | class Process: |
| 350 | 351 | """ |
| 351 | 352 | Process running parameters. |
| … |
… |
|
| 353 | 354 | Sets up uid/gid in the constructor, and has a default |
| 354 | 355 | of C{None} as C{processName}. |
| 355 | 356 | """ |
| | 357 | implements(IProcess) |
| 356 | 358 | processName = None |
| 357 | 359 | |
| 358 | 360 | def __init__(self, uid=None, gid=None): |
diff --git twisted/application/test/test_internet.py twisted/application/test/test_internet.py
index 5ffc2a5..9e058d7 100644
|
|
|
|
| 6 | 6 | """ |
| 7 | 7 | |
| 8 | 8 | |
| 9 | | from zope.interface import implementer |
| | 9 | from zope.interface import implements |
| 10 | 10 | from zope.interface.verify import verifyClass |
| 11 | 11 | |
| 12 | 12 | from twisted.internet.protocol import Factory |
| … |
… |
|
| 15 | 15 | from twisted.internet.interfaces import IStreamServerEndpoint, IListeningPort |
| 16 | 16 | from twisted.internet.defer import Deferred, CancelledError |
| 17 | 17 | |
| 18 | | @implementer(IStreamServerEndpoint) |
| 19 | 18 | class FakeServer(object): |
| 20 | 19 | """ |
| 21 | 20 | In-memory implementation of L{IStreamServerEndpoint}. |
| … |
… |
|
| 37 | 36 | returned from C{listen} before it is returned. |
| 38 | 37 | """ |
| 39 | 38 | |
| | 39 | implements(IStreamServerEndpoint) |
| | 40 | |
| 40 | 41 | result = None |
| 41 | 42 | factory = None |
| 42 | 43 | failImmediately = None |
| … |
… |
|
| 83 | 84 | |
| 84 | 85 | |
| 85 | 86 | |
| 86 | | @implementer(IListeningPort) |
| 87 | 87 | class FakePort(object): |
| 88 | 88 | """ |
| 89 | 89 | Fake L{IListeningPort} implementation. |
| … |
… |
|
| 91 | 91 | @ivar deferred: The L{Deferred} returned by C{stopListening}. |
| 92 | 92 | """ |
| 93 | 93 | |
| | 94 | implements(IListeningPort) |
| | 95 | |
| 94 | 96 | deferred = None |
| 95 | 97 | |
| 96 | 98 | def stopListening(self): |