Package twisted :: Package python :: Module components :: Class Interface

[show private | hide private]
[frames | no frames]

## Class Interface

Known Subclasses:
  `IProtocolFactory`, `ICollection`, `IService`, `IConnector`, `IConfigurator`, `IResource`, `IDomain`, `IConsumer`, `IPerson`, `IAccount`, `IConversation`, `IGroup`, `IGroupConversation`, `IChatUI`, `IClient`, `IReactorProcess`, `IResolverSimple`, `ITransport`, `IReactorPluggableResolver`, `IFileDescriptor`, `IReactorTCP`, `IReactorArbitrary`, `IProducer`, `IMulticastTransport`, `IListeningPort`, `IReactorTime`, `IReactorFDSet`, `IUDPTransport`, `IReactorCore`, `IReactorUNIX`, `IReactorThreads`, `IDelayedCall`, `IServiceCollection`, `IReactorSSL`, `IReactorUDP`, `IUDPConnectedTransport`, `IReactorMulticast`, `IMessage`, `IManholeClient`, `ICommand`, `ICommandLog`, `IHeaderSaver`, `IModel`, `IView`, `IWovenLivePage`, `IController`, `INodeMutator`, `IWordsClient`, `IWordsPolicy`

Base class for interfaces.

Interfaces define and document an interface for a class. An interface class's name must begin with I, and all its methods should have no implementation code.

Objects that implement an interface should have an attribute __implements__, that should be either an Interface subclass or a tuple, or tuple of tuples, of such Interface classes.

A class whose instances implement an interface should list the interfaces its instances implement in a class-level __implements__.

For example:

       | class IAdder(Interface):
       |     'Objects implementing this interface can add objects.'
       |
       |     def add(self, a, b):
       |         'Add two objects together and return the result.'
       |
       | class Adder:
       |
       |     __implements__ = IAdder
       |
       |     def add(self, a, b):
       |         return a + b

Generated by Epydoc 1.1 on Sat Feb 15 21:19:16 2003 | http://epydoc.sf.net