twisted.python.components.Interface.html [plain text]
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>twisted.python.components.Interface</title>
<link rel="stylesheet" href="epydoc.css" type="text/css"></link>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<!-- =========== START OF NAVBAR =========== -->
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
<tr valign="center">
<th class="navbar"> <a class="navbar" href="twisted.html">Home</a> </th>
<th class="navbar"> <a class="navbar" href="trees.html">Trees</a> </th>
<th class="navbar"> <a class="navbar" href="indices.html">Index</a> </th>
<th class="navbar"> <a class="navbar" href="help.html">Help</a> </th>
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center">
<p class="nomargin">
<a class="navbar" target="_top" href="http://twistedmatrix.com/">Twisted 1.3.0rc1</a>
</p></th></tr></table>
</th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<font size="-1"><b class="breadcrumbs">
<a href="twisted.html">Package twisted</a> ::
<a href="twisted.python.html">Package python</a> ::
<a href="twisted.python.components.html">Module components</a> ::
Class Interface
</b></font></br>
</td>
<td><table cellpadding="0" cellspacing="0">
<tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a> | <a href="twisted.python.components.Interface.html" target="_top">no frames</a>]</font></td></tr>
</table></td>
</tr></table>
<!-- =========== START OF CLASS DESCRIPTION =========== -->
<h2 class="class">Class Interface</h2>
<dl><dt><b>Known Subclasses:</b></dt>
<dd>
<a href="twisted.im.interfaces.IAccount.html"><code>IAccount</code></a>,
<a href="twisted.protocols.imap4.IAccount.html"><code>IAccount</code></a>,
<a href="twisted.internet.interfaces.IAddress.html"><code>IAddress</code></a>,
<a href="twisted.mail.alias.IAlias.html"><code>IAlias</code></a>,
<a href="twisted.protocols.sip.IAuthorizer.html"><code>IAuthorizer</code></a>,
<a href="twisted.protocols.htb.IBucketFilter.html"><code>IBucketFilter</code></a>,
<a href="twisted.im.interfaces.IChatUI.html"><code>IChatUI</code></a>,
<a href="twisted.im.interfaces.IClient.html"><code>IClient</code></a>,
<a href="twisted.protocols.imap4.IClientAuthentication.html"><code>IClientAuthentication</code></a>,
<a href="twisted.protocols.imap4.ICloseableMailbox.html"><code>ICloseableMailbox</code></a>,
<a href="twisted.persisted.journal.base.ICommand.html"><code>ICommand</code></a>,
<a href="twisted.persisted.journal.base.ICommandLog.html"><code>ICommandLog</code></a>,
<a href="twisted.conch.interfaces.IConchUser.html"><code>IConchUser</code></a>,
<a href="twisted.internet.interfaces.IConnector.html"><code>IConnector</code></a>,
<a href="twisted.internet.interfaces.IConsumer.html"><code>IConsumer</code></a>,
<a href="twisted.protocols.sip.IContact.html"><code>IContact</code></a>,
<a href="twisted.web.woven.interfaces.IController.html"><code>IController</code></a>,
<a href="twisted.im.interfaces.IConversation.html"><code>IConversation</code></a>,
<a href="twisted.cred.credentials.ICredentials.html"><code>ICredentials</code></a>,
<a href="twisted.cred.checkers.ICredentialsChecker.html"><code>ICredentialsChecker</code></a>,
<a href="twisted.internet.interfaces.IDelayedCall.html"><code>IDelayedCall</code></a>,
<a href="twisted.mail.mail.IDomain.html"><code>IDomain</code></a>,
<a href="twisted.protocols.ethernet.IEthernetProtocol.html"><code>IEthernetProtocol</code></a>,
<a href="twisted.internet.interfaces.IFileDescriptor.html"><code>IFileDescriptor</code></a>,
<a href="twisted.protocols.ftp.IFTPShell.html"><code>IFTPShell</code></a>,
<a href="twisted.im.interfaces.IGroup.html"><code>IGroup</code></a>,
<a href="twisted.im.interfaces.IGroupConversation.html"><code>IGroupConversation</code></a>,
<a href="twisted.spread.interfaces.IJellyable.html"><code>IJellyable</code></a>,
<a href="twisted.internet.interfaces.IListeningPort.html"><code>IListeningPort</code></a>,
<a href="twisted.protocols.sip.ILocator.html"><code>ILocator</code></a>,
<a href="twisted.protocols.pop3.IMailbox.html"><code>IMailbox</code></a>,
<a href="twisted.protocols.imap4.IMailboxInfo.html"><code>IMailboxInfo</code></a>,
<a href="twisted.protocols.imap4.IMailboxListener.html"><code>IMailboxListener</code></a>,
<a href="twisted.manhole.service.IManholeClient.html"><code>IManholeClient</code></a>,
<a href="twisted.protocols.smtp.IMessage.html"><code>IMessage</code></a>,
<a href="twisted.protocols.imap4.IMessageCopier.html"><code>IMessageCopier</code></a>,
<a href="twisted.protocols.smtp.IMessageDelivery.html"><code>IMessageDelivery</code></a>,
<a href="twisted.protocols.smtp.IMessageDeliveryFactory.html"><code>IMessageDeliveryFactory</code></a>,
<a href="twisted.protocols.imap4.IMessageFile.html"><code>IMessageFile</code></a>,
<a href="twisted.protocols.imap4.IMessagePart.html"><code>IMessagePart</code></a>,
<a href="twisted.web.woven.interfaces.IModel.html"><code>IModel</code></a>,
<a href="twisted.internet.interfaces.IMulticastTransport.html"><code>IMulticastTransport</code></a>,
<a href="twisted.protocols.imap4.INamespacePresenter.html"><code>INamespacePresenter</code></a>,
<a href="twisted.news.database.INewsStorage.html"><code>INewsStorage</code></a>,
<a href="twisted.manhole._inspectro.INode.html"><code>INode</code></a>,
<a href="twisted.web.woven.template.INodeMutator.html"><code>INodeMutator</code></a>,
<a href="twisted.application.compat.IOldApplication.html"><code>IOldApplication</code></a>,
<a href="twisted.spread.flavors.IPBRoot.html"><code>IPBRoot</code></a>,
<a href="twisted.persisted.sob.IPersistable.html"><code>IPersistable</code></a>,
<a href="twisted.im.interfaces.IPerson.html"><code>IPerson</code></a>,
<a href="twisted.cred.perspective.IPerspective.html"><code>IPerspective</code></a>,
<a href="twisted.spread.pb.IPerspective.html"><code>IPerspective</code></a>,
<a href="twisted.application.service.IProcess.html"><code>IProcess</code></a>,
<a href="twisted.internet.interfaces.IProducer.html"><code>IProducer</code></a>,
<a href="twisted.internet.interfaces.IProtocol.html"><code>IProtocol</code></a>,
<a href="twisted.internet.interfaces.IProtocolFactory.html"><code>IProtocolFactory</code></a>,
<a href="twisted.protocols.raw.IRawDatagramProtocol.html"><code>IRawDatagramProtocol</code></a>,
<a href="twisted.protocols.raw.IRawPacketProtocol.html"><code>IRawPacketProtocol</code></a>,
<a href="twisted.internet.interfaces.IReactorArbitrary.html"><code>IReactorArbitrary</code></a>,
<a href="twisted.internet.interfaces.IReactorCore.html"><code>IReactorCore</code></a>,
<a href="twisted.internet.interfaces.IReactorFDSet.html"><code>IReactorFDSet</code></a>,
<a href="twisted.internet.interfaces.IReactorMulticast.html"><code>IReactorMulticast</code></a>,
<a href="twisted.internet.interfaces.IReactorPluggableResolver.html"><code>IReactorPluggableResolver</code></a>,
<a href="twisted.internet.interfaces.IReactorProcess.html"><code>IReactorProcess</code></a>,
<a href="twisted.internet.interfaces.IReactorSSL.html"><code>IReactorSSL</code></a>,
<a href="twisted.internet.interfaces.IReactorTCP.html"><code>IReactorTCP</code></a>,
<a href="twisted.internet.interfaces.IReactorThreads.html"><code>IReactorThreads</code></a>,
<a href="twisted.internet.interfaces.IReactorTime.html"><code>IReactorTime</code></a>,
<a href="twisted.internet.interfaces.IReactorUDP.html"><code>IReactorUDP</code></a>,
<a href="twisted.internet.interfaces.IReactorUNIX.html"><code>IReactorUNIX</code></a>,
<a href="twisted.internet.interfaces.IReactorUNIXDatagram.html"><code>IReactorUNIXDatagram</code></a>,
<a href="twisted.cred.portal.IRealm.html"><code>IRealm</code></a>,
<a href="twisted.protocols.sip.IRegistry.html"><code>IRegistry</code></a>,
<a href="twisted.trial.remote.IRemoteReporter.html"><code>IRemoteReporter</code></a>,
<a href="twisted.internet.interfaces.IResolverSimple.html"><code>IResolverSimple</code></a>,
<a href="twisted.web.resource.IResource.html"><code>IResource</code></a>,
<a href="twisted.protocols.imap4.ISearchableMailbox.html"><code>ISearchableMailbox</code></a>,
<a href="twisted.protocols.pop3.IServerFactory.html"><code>IServerFactory</code></a>,
<a href="twisted.application.service.IService.html"><code>IService</code></a>,
<a href="twisted.cred.service.IService.html"><code>IService</code></a>,
<a href="twisted.protocols.jabber.component.IService.html"><code>IService</code></a>,
<a href="twisted.application.service.IServiceCollection.html"><code>IServiceCollection</code></a>,
<a href="twisted.internet.interfaces.IServiceCollection.html"><code>IServiceCollection</code></a>,
<a href="twisted.conch.interfaces.ISession.html"><code>ISession</code></a>,
<a href="twisted.conch.interfaces.ISFTPServer.html"><code>ISFTPServer</code></a>,
<a href="twisted.internet.interfaces.ISystemHandle.html"><code>ISystemHandle</code></a>,
<a href="twisted.trial.runner.ITestRunner.html"><code>ITestRunner</code></a>,
<a href="twisted.internet.interfaces.ITransport.html"><code>ITransport</code></a>,
<a href="twisted.internet.interfaces.IUDPConnectedTransport.html"><code>IUDPConnectedTransport</code></a>,
<a href="twisted.internet.interfaces.IUDPTransport.html"><code>IUDPTransport</code></a>,
<a href="twisted.internet.interfaces.IUNIXDatagramConnectedTransport.html"><code>IUNIXDatagramConnectedTransport</code></a>,
<a href="twisted.internet.interfaces.IUNIXDatagramTransport.html"><code>IUNIXDatagramTransport</code></a>,
<a href="twisted.spread.interfaces.IUnjellyable.html"><code>IUnjellyable</code></a>,
<a href="twisted.web.woven.interfaces.IView.html"><code>IView</code></a>,
<a href="twisted.words.service.IWordsClient.html"><code>IWordsClient</code></a>,
<a href="twisted.words.service.IWordsPolicy.html"><code>IWordsPolicy</code></a>,
<a href="twisted.web.woven.interfaces.IWovenLivePage.html"><code>IWovenLivePage</code></a></dd></dl>
<hr/>
<p>Base class for interfaces.</p>
<p>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.</p>
<p>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.</p>
<p>A class whose instances implement an interface should list the
interfaces its instances implement in a class-level __implements__.</p>
For example:
<pre class="literalblock">
| 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
</pre>
You can call an Interface with a single argument; If the passed object
can be adapted to the Interface in some way, the adapter will be
returned.
<hr/>
<!-- =========== START OF NAVBAR =========== -->
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
<tr valign="center">
<th class="navbar"> <a class="navbar" href="twisted.html">Home</a> </th>
<th class="navbar"> <a class="navbar" href="trees.html">Trees</a> </th>
<th class="navbar"> <a class="navbar" href="indices.html">Index</a> </th>
<th class="navbar"> <a class="navbar" href="help.html">Help</a> </th>
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center">
<p class="nomargin">
<a class="navbar" target="_top" href="http://twistedmatrix.com/">Twisted 1.3.0rc1</a>
</p></th></tr></table>
</th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left"><font size="-2">Generated by Epydoc 2.0 on Sat May 15 20:07:36 2004</font></td>
<td align="right"><a href="http://epydoc.sourceforge.net"
><font size="-2">http://epydoc.sf.net</font></a></td>
</tr>
</table>
</body>
</html>