Package twisted :: Package internet :: Module app :: Class Application
[show private | hide private]
[frames | no frames]

Class Application

                    Logger --+
                             |
                 Versioned --+
                             |
          OriginalAccessor --+
                             |
_AbstractServiceCollection --+
                             |
                            Application


I am the `root object' in a Twisted process.

I represent a set of persistent, potentially interconnected listening TCP ports, delayed event schedulers, and service.Services.
Method Summary
  __init__(self, name, uid, gid, authorizer, authorizer_)
Initialize me.
  __delattr__(self, k)
(inherited from OriginalAccessor)
  __getattr__(self, k)
(inherited from OriginalAccessor)
  __getstate__(self)
  __repr__(self)
  __setattr__(self, k, v)
(inherited from OriginalAccessor)
  __setstate__(self, state)
(inherited from Versioned)
  addService(self, service)
Add a service to this collection. (inherited from _AbstractServiceCollection)
  bindPorts(self)
  connectSSL(self, host, port, factory, ctxFactory, timeout, bindAddress)
Connect a given client protocol factory to a specific SSL server.
  connectTCP(self, host, port, factory, timeout, bindAddress)
Connect a given client protocol factory to a specific TCP server.
  connectUDP(self, remotehost, remoteport, protocol, localport, interface, maxPacketSize)
Connects a ConnectedDatagramProtocolinstance to a UDP port.
  connectUNIX(self, address, factory, timeout)
Connect a given client protocol factory to a specific UNIX socket.
  connectWith(self, connectorType, *args, **kw)
Start an instance of the given connectorTypeconnecting.
  get_authorizer(self)
  getServiceNamed(self, serviceName)
Retrieve the named service from this application. (inherited from _AbstractServiceCollection)
  listenSSL(self, port, factory, ctxFactory, backlog, interface)
Connects a given protocol factory to the given numeric TCP/IP port.
  listenTCP(self, port, factory, backlog, interface)
Connects a given protocol factory to the given numeric TCP/IP port.
  listenUDP(self, port, proto, interface, maxPacketSize)
Connects a given DatagramProtocol to the given numeric UDP port.
  listenUNIX(self, filename, factory, backlog, mode)
Connects a given protocol factory to the UNIX socket with the given filename.
  listenWith(self, portType, *args, **kw)
Start an instance of the given portTypelistening.
  logPrefix(self)
A log prefix which describes me.
  reallyDel(self, k)
*actually* del self.k without incurring side-effects. (inherited from OriginalAccessor)
  reallySet(self, k, v)
*actually* set self.k to v without incurring side-effects. (inherited from OriginalAccessor)
  removeService(self, service)
Remove a service from this collection. (inherited from _AbstractServiceCollection)
  run(self, save, installSignalHandlers)
run(save=1, installSignalHandlers=1) Run this application, running the main loop if necessary.
  save(self, tag, filename, passphrase)
Save a pickle of this application to a file in the current directory.
  setEUID(self)
Retrieve persistent uid/gid pair (if possible) and set the current process's euid/egid.
  setUID(self)
Retrieve persistent uid/gid pair (if possible) and set the current process's uid/gid
  unlistenSSL(self, port, interface)
Stop an SSL Port listening on the given interface and port.
  unlistenTCP(self, port, interface)
Stop a Port listening on the given port and interface.
  unlistenUDP(self, port, interface)
Stop a DatagramProtocol listening on the given local port and interface.
  unlistenUNIX(self, filename)
Stop a Port listening on the given filename.
  unlistenWith(self, portType, *args, **kw)
Stop a Port listening with the given parameters.
  upgradeToVersion1(self)
Version 1 Persistence Upgrade
  upgradeToVersion10(self)
  upgradeToVersion11(self)
  upgradeToVersion12(self)
  upgradeToVersion2(self)
Version 2 Persistence Upgrade
  upgradeToVersion3(self)
Version 3 Persistence Upgrade
  upgradeToVersion4(self)
Version 4 Persistence Upgrade
  upgradeToVersion5(self)
  upgradeToVersion6(self)
  upgradeToVersion7(self)
  upgradeToVersion8(self)
  upgradeToVersion9(self)
  versionUpgrade(self)
(internal) Do a version upgrade. (inherited from Versioned)
  _afterShutDown(self)
  _beforeShutDown(self)
  _doBindPorts(self)

Class Variable Summary
int persistenceVersion
str persistStyle
NoneType processName
int running
NoneType _authorizer
int _boundPorts

Method Details

__init__(self, name, uid=None, gid=None, authorizer=None, authorizer_=None)
(Constructor)

Initialize me.

If uid and gid arguments are not provided, this application will default to having the uid and gid of the user and group who created it.
Parameters:
name - a name
uid - (optional) a POSIX user-id. Only used on POSIX systems.
gid - (optional) a POSIX group-id. Only used on POSIX systems.

connectSSL(self, host, port, factory, ctxFactory, timeout=30, bindAddress=None)

Connect a given client protocol factory to a specific SSL server.

connectTCP(self, host, port, factory, timeout=30, bindAddress=None)

Connect a given client protocol factory to a specific TCP server.

connectUDP(self, remotehost, remoteport, protocol, localport=0, interface='', maxPacketSize=8192)

Connects a ConnectedDatagramProtocol instance to a UDP port.

connectUNIX(self, address, factory, timeout=30)

Connect a given client protocol factory to a specific UNIX socket.

connectWith(self, connectorType, *args, **kw)

Start an instance of the given connectorType connecting.
Parameters:
connectorType
           (type=type which implements IConnector)

listenSSL(self, port, factory, ctxFactory, backlog=5, interface='')

Connects a given protocol factory to the given numeric TCP/IP port. The connection is a SSL one, using contexts created by the context factory.

listenTCP(self, port, factory, backlog=5, interface='')

Connects a given protocol factory to the given numeric TCP/IP port.

listenUDP(self, port, proto, interface='', maxPacketSize=8192)

Connects a given DatagramProtocol to the given numeric UDP port.

listenUNIX(self, filename, factory, backlog=5, mode=438)

Connects a given protocol factory to the UNIX socket with the given filename.

listenWith(self, portType, *args, **kw)

Start an instance of the given portType listening.
Parameters:
portType
           (type=type which implements IListeningPort)

logPrefix(self)

A log prefix which describes me.

run(self, save=1, installSignalHandlers=1)

run(save=1, installSignalHandlers=1) Run this application, running the main loop if necessary. If 'save' is true, then when this Application is shut down, it will be persisted to a pickle. 'installSignalHandlers' is passed through to reactor.run(), the function that starts the mainloop.

save(self, tag=None, filename=None, passphrase=None)

Save a pickle of this application to a file in the current directory.

setEUID(self)

Retrieve persistent uid/gid pair (if possible) and set the current process's euid/egid.

setUID(self)

Retrieve persistent uid/gid pair (if possible) and set the current process's uid/gid

unlistenSSL(self, port, interface='')

Stop an SSL Port listening on the given interface and port.

unlistenTCP(self, port, interface='')

Stop a Port listening on the given port and interface.

unlistenUDP(self, port, interface='')

Stop a DatagramProtocol listening on the given local port and interface.

unlistenUNIX(self, filename)

Stop a Port listening on the given filename.

unlistenWith(self, portType, *args, **kw)

Stop a Port listening with the given parameters.

upgradeToVersion1(self)

Version 1 Persistence Upgrade

upgradeToVersion2(self)

Version 2 Persistence Upgrade

upgradeToVersion3(self)

Version 3 Persistence Upgrade

upgradeToVersion4(self)

Version 4 Persistence Upgrade

Class Variable Details

persistenceVersion

Type:
int
Value:
12                                                                     

persistStyle

Type:
str
Value:
'pickle'                                                               

processName

Type:
NoneType
Value:
None                                                                   

running

Type:
int
Value:
0                                                                      

_authorizer

Type:
NoneType
Value:
None                                                                   

_boundPorts

Type:
int
Value:
0                                                                      

Generated by Epydoc 1.1 on Thu May 8 13:18:24 2003 http://epydoc.sf.net