Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F120999179
twisted.internet.protocol.Factory-class.html
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Jul 8, 06:05
Size
15 KB
Mime Type
text/xml
Expires
Thu, Jul 10, 06:05 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
27276359
Attached To
R3596 pybliographer
twisted.internet.protocol.Factory-class.html
View Options
<?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.internet.protocol.Factory
</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=
"Pyblio-module.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"
>
pybliographer
1.3.3
</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"
>
Package
twisted ::
Package
internet ::
Module
protocol ::
Class
Factory
</b></font></br>
</td>
<td><table
cellpadding=
"0"
cellspacing=
"0"
>
<tr><td
align=
"right"
><font
size=
"-2"
>
[
<a
href=
"../private/twisted.internet.protocol.Factory-class.html"
>
show
private
</a>
|
hide
private]
</font></td></tr>
<tr><td
align=
"right"
><font
size=
"-2"
>
[
<a
href=
"frames.html"
target=
"_top"
>
frames
</a>
|
<a
href=
"twisted.internet.protocol.Factory-class.html"
target=
"_top"
>
no
frames
</a>
]
</font></td></tr>
</table></td>
</tr></table>
<!-- =========== START OF CLASS DESCRIPTION =========== -->
<h2
class=
"class"
>
Class Factory
</h2>
<dl><dt><b>
Known Subclasses:
</b></dt>
<dd>
<a
href=
"twisted.internet.protocol.ClientFactory-class.html"
><code>
ClientFactory
</code></a></dd></dl>
<hr/>
<p>
This is a factory which produces protocols.
</p>
By default, buildProtocol will create a protocol of the class given in
self.protocol.
<hr/>
<!-- =========== START OF METHOD SUMMARY =========== -->
<table
class=
"summary"
border=
"1"
cellpadding=
"3"
cellspacing=
"0"
width=
"100%"
bgcolor=
"white"
>
<tr
bgcolor=
"#70b0f0"
class=
"summary"
>
<th
colspan=
"2"
>
Method Summary
</th></tr>
<tr><td
align=
"right"
valign=
"top"
width=
"15%"
><font
size=
"-1"
>
</font></td>
<td><code><span
class=
"summary-sig"
><a
href=
"twisted.internet.protocol.Factory-class.html#buildProtocol"
class=
"summary-sig-name"
><code>
buildProtocol
</code></a>
(
<span
class=
summary-sig-arg
>
self
</span>
,
<span
class=
summary-sig-arg
>
addr
</span>
)
</span></code>
<br
/>
Create an instance of a subclass of Protocol.
</td></tr>
<tr><td
align=
"right"
valign=
"top"
width=
"15%"
><font
size=
"-1"
>
</font></td>
<td><code><span
class=
"summary-sig"
><a
href=
"twisted.internet.protocol.Factory-class.html#doStart"
class=
"summary-sig-name"
><code>
doStart
</code></a>
(
<span
class=
summary-sig-arg
>
self
</span>
)
</span></code>
<br
/>
Make sure startFactory is called.
</td></tr>
<tr><td
align=
"right"
valign=
"top"
width=
"15%"
><font
size=
"-1"
>
</font></td>
<td><code><span
class=
"summary-sig"
><a
href=
"twisted.internet.protocol.Factory-class.html#doStop"
class=
"summary-sig-name"
><code>
doStop
</code></a>
(
<span
class=
summary-sig-arg
>
self
</span>
)
</span></code>
<br
/>
Make sure stopFactory is called.
</td></tr>
<tr><td
align=
"right"
valign=
"top"
width=
"15%"
><font
size=
"-1"
>
</font></td>
<td><code><span
class=
"summary-sig"
><a
href=
"twisted.internet.protocol.Factory-class.html#startFactory"
class=
"summary-sig-name"
><code>
startFactory
</code></a>
(
<span
class=
summary-sig-arg
>
self
</span>
)
</span></code>
<br
/>
This will be called before I begin listening on a Port or
Connector.
</td></tr>
<tr><td
align=
"right"
valign=
"top"
width=
"15%"
><font
size=
"-1"
>
</font></td>
<td><code><span
class=
"summary-sig"
><a
href=
"twisted.internet.protocol.Factory-class.html#stopFactory"
class=
"summary-sig-name"
><code>
stopFactory
</code></a>
(
<span
class=
summary-sig-arg
>
self
</span>
)
</span></code>
<br
/>
This will be called before I stop listening on all
Ports/Connectors.
</td></tr>
</table><br
/>
<!-- =========== START OF CLASS VARIABLE SUMMARY =========== -->
<table
class=
"summary"
border=
"1"
cellpadding=
"3"
cellspacing=
"0"
width=
"100%"
bgcolor=
"white"
>
<tr
bgcolor=
"#70b0f0"
class=
"summary"
>
<th
colspan=
"2"
>
Class Variable Summary
</th></tr>
<tr><td
align=
"right"
valign=
"top"
width=
"15%"
><font
size=
"-1"
><code>
Implements
</code></font></td>
<td><b><a
href=
"twisted.internet.protocol.Factory-class.html#__implemented__"
><code>
__implemented__
</code></a></b>
=
<span
title=
"<implementedBy twisted.internet.protocol.Factory>"
><code>
<
implementedBy
twisted.internet.protoc
<span
class=
"variable-ellipsis"
>
...
</span></code>
</span></td></tr>
<tr><td
align=
"right"
valign=
"top"
width=
"15%"
><font
size=
"-1"
><code>
ClassProvides
</code></font></td>
<td><b><a
href=
"twisted.internet.protocol.Factory-class.html#__providedBy__"
><code>
__providedBy__
</code></a></b>
=
<span
title=
"<zope.interface.declarations.ClassProvides object at 0xa57eb20c>"
><code>
<
zope.interface.declarations.ClassProvi
<span
class=
"variable-ellipsis"
>
...
</span></code>
</span></td></tr>
<tr><td
align=
"right"
valign=
"top"
width=
"15%"
><font
size=
"-1"
><code>
ClassProvides
</code></font></td>
<td><b><a
href=
"twisted.internet.protocol.Factory-class.html#__provides__"
><code>
__provides__
</code></a></b>
=
<span
title=
"<zope.interface.declarations.ClassProvides object at 0xa57eb20c>"
><code>
<
zope.interface.declarations.ClassProvide
<span
class=
"variable-ellipsis"
>
...
</span></code>
</span></td></tr>
<tr><td
align=
"right"
valign=
"top"
width=
"15%"
><font
size=
"-1"
><code>
bool
</code></font></td>
<td><b><a
href=
"twisted.internet.protocol.Factory-class.html#noisy"
><code>
noisy
</code></a></b>
=
<span
title=
"True"
><code>
True
</code>
</span></td></tr>
<tr><td
align=
"right"
valign=
"top"
width=
"15%"
><font
size=
"-1"
><code>
int
</code></font></td>
<td><b><a
href=
"twisted.internet.protocol.Factory-class.html#numPorts"
><code>
numPorts
</code></a></b>
=
<span
title=
"0"
>
0
</span></td></tr>
<tr><td
align=
"right"
valign=
"top"
width=
"15%"
><font
size=
"-1"
><code>
NoneType
</code></font></td>
<td><b><a
href=
"twisted.internet.protocol.Factory-class.html#protocol"
><code>
protocol
</code></a></b>
=
<span
title=
"None"
>
None
</span></td></tr>
</table><br
/>
<!-- =========== START OF METHOD DETAILS =========== -->
<table
class=
"details"
border=
"1"
cellpadding=
"3"
cellspacing=
"0"
width=
"100%"
bgcolor=
"white"
>
<tr
bgcolor=
"#70b0f0"
class=
"details"
>
<th
colspan=
"2"
>
Method Details
</th></tr>
</table>
<a
name=
"buildProtocol"
></a>
<table
width=
"100%"
class=
"func-details"
bgcolor=
"#e0e0e0"
><tr><td>
<h3><span
class=
"sig"
><span
class=
"sig-name"
>
buildProtocol
</span>
(
<span
class=
sig-arg
>
self
</span>
,
<span
class=
sig-arg
>
addr
</span>
)
</span>
</h3>
<p>
Create an instance of a subclass of Protocol.
</p>
<p>
The returned instance will handle input on an incoming server
connection, and an attribute
"
factory
"
pointing to the
creating factory.
</p>
Override this method to alter how Protocol instances get
created.
<dl><dt></dt><dd>
<dl><dt><b>
Parameters:
</b></dt>
<dd><code><b>
addr
</b></code>
-
an object implementing
<code>
twisted.internet.interfaces.IAddress
</code>
</dd>
</dl>
</dd></dl>
</td></tr></table>
<a
name=
"doStart"
></a>
<table
width=
"100%"
class=
"func-details"
bgcolor=
"#e0e0e0"
><tr><td>
<h3><span
class=
"sig"
><span
class=
"sig-name"
>
doStart
</span>
(
<span
class=
sig-arg
>
self
</span>
)
</span>
</h3>
<p>
Make sure startFactory is called.
</p>
Users should not call this function themselves!
<dl><dt></dt><dd>
</dd></dl>
</td></tr></table>
<a
name=
"doStop"
></a>
<table
width=
"100%"
class=
"func-details"
bgcolor=
"#e0e0e0"
><tr><td>
<h3><span
class=
"sig"
><span
class=
"sig-name"
>
doStop
</span>
(
<span
class=
sig-arg
>
self
</span>
)
</span>
</h3>
<p>
Make sure stopFactory is called.
</p>
Users should not call this function themselves!
<dl><dt></dt><dd>
</dd></dl>
</td></tr></table>
<a
name=
"startFactory"
></a>
<table
width=
"100%"
class=
"func-details"
bgcolor=
"#e0e0e0"
><tr><td>
<h3><span
class=
"sig"
><span
class=
"sig-name"
>
startFactory
</span>
(
<span
class=
sig-arg
>
self
</span>
)
</span>
</h3>
<p>
This will be called before I begin listening on a Port or
Connector.
</p>
<p>
It will only be called once, even if the factory is connected to
multiple ports.
</p>
This can be used to perform 'unserialization' tasks that are best
put off until things are actually running, such as connecting to a
database, opening files, etcetera.
<dl><dt></dt><dd>
</dd></dl>
</td></tr></table>
<a
name=
"stopFactory"
></a>
<table
width=
"100%"
class=
"func-details"
bgcolor=
"#e0e0e0"
><tr><td>
<h3><span
class=
"sig"
><span
class=
"sig-name"
>
stopFactory
</span>
(
<span
class=
sig-arg
>
self
</span>
)
</span>
</h3>
<p>
This will be called before I stop listening on all
Ports/Connectors.
</p>
<p>
This can be overridden to perform 'shutdown' tasks such as
disconnecting database connections, closing files, etc.
</p>
It will be called, for example, before an application shuts down, if
it was connected to a port. User code should not call this function
directly.
<dl><dt></dt><dd>
</dd></dl>
</td></tr></table>
<br
/>
<!-- =========== START OF CLASS VARIABLE DETAILS =========== -->
<table
class=
"details"
border=
"1"
cellpadding=
"3"
cellspacing=
"0"
width=
"100%"
bgcolor=
"white"
>
<tr
bgcolor=
"#70b0f0"
class=
"details"
>
<th
colspan=
"2"
>
Class Variable Details
</th></tr>
</table>
<table
width=
"100%"
class=
"var-details"
bgcolor=
"#e0e0e0"
><tr><td>
<a
name=
"__implemented__"
></a>
<h3>
__implemented__
</h3>
<dl>
<dt></dt>
<dd>
<dl>
<dt><b>
Type:
</b></dt>
<dd>
<code>
Implements
</code>
</dd>
<span
title=
"<implementedBy twisted.internet.protocol.Factory>"
>
<dt><b>
Value:
</b></dt>
<dd><table><tr><td>
<pre
class=
"variable"
>
<
implementedBy twisted.internet.protocol.Factory
>
</pre>
</td></tr></table></dd>
</span>
</dl>
</dd>
</dl></td></tr></table>
<table
width=
"100%"
class=
"var-details"
bgcolor=
"#e0e0e0"
><tr><td>
<a
name=
"__providedBy__"
></a>
<h3>
__providedBy__
</h3>
<dl>
<dt></dt>
<dd>
<dl>
<dt><b>
Type:
</b></dt>
<dd>
<code>
ClassProvides
</code>
</dd>
<span
title=
"<zope.interface.declarations.ClassProvides object at 0xa57eb20c>"
>
<dt><b>
Value:
</b></dt>
<dd><table><tr><td>
<pre
class=
"variable"
>
<
zope.interface.declarations.ClassProvides object at 0xa57eb20c
>
</pre>
</td></tr></table></dd>
</span>
</dl>
</dd>
</dl></td></tr></table>
<table
width=
"100%"
class=
"var-details"
bgcolor=
"#e0e0e0"
><tr><td>
<a
name=
"__provides__"
></a>
<h3>
__provides__
</h3>
<dl>
<dt></dt>
<dd>
<dl>
<dt><b>
Type:
</b></dt>
<dd>
<code>
ClassProvides
</code>
</dd>
<span
title=
"<zope.interface.declarations.ClassProvides object at 0xa57eb20c>"
>
<dt><b>
Value:
</b></dt>
<dd><table><tr><td>
<pre
class=
"variable"
>
<
zope.interface.declarations.ClassProvides object at 0xa57eb20c
>
</pre>
</td></tr></table></dd>
</span>
</dl>
</dd>
</dl></td></tr></table>
<table
width=
"100%"
class=
"var-details"
bgcolor=
"#e0e0e0"
><tr><td>
<a
name=
"noisy"
></a>
<h3>
noisy
</h3>
<dl>
<dt></dt>
<dd>
<dl>
<dt><b>
Type:
</b></dt>
<dd>
<code>
bool
</code>
</dd>
<span
title=
"True"
>
<dt><b>
Value:
</b></dt>
<dd><table><tr><td>
<pre
class=
"variable"
>
True
</pre>
</td></tr></table></dd>
</span>
</dl>
</dd>
</dl></td></tr></table>
<table
width=
"100%"
class=
"var-details"
bgcolor=
"#e0e0e0"
><tr><td>
<a
name=
"numPorts"
></a>
<h3>
numPorts
</h3>
<dl>
<dt></dt>
<dd>
<dl>
<dt><b>
Type:
</b></dt>
<dd>
<code>
int
</code>
</dd>
<span
title=
"0"
>
<dt><b>
Value:
</b></dt>
<dd><table><tr><td>
<pre
class=
"variable"
>
0
</pre>
</td></tr></table></dd>
</span>
</dl>
</dd>
</dl></td></tr></table>
<table
width=
"100%"
class=
"var-details"
bgcolor=
"#e0e0e0"
><tr><td>
<a
name=
"protocol"
></a>
<h3>
protocol
</h3>
<dl>
<dt></dt>
<dd>
<dl>
<dt><b>
Type:
</b></dt>
<dd>
<code>
NoneType
</code>
</dd>
<span
title=
"None"
>
<dt><b>
Value:
</b></dt>
<dd><table><tr><td>
<pre
class=
"variable"
>
None
</pre>
</td></tr></table></dd>
</span>
</dl>
</dd>
</dl></td></tr></table>
<br
/>
<!-- =========== 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=
"Pyblio-module.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"
>
pybliographer
1.3.3
</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.1 on Sun Sep 24 23:52:43 2006
</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>
Event Timeline
Log In to Comment