Package flumotion :: Package job :: Module job :: Class JobClientFactory
[show private | hide private]
[frames | no frames]

Class JobClientFactory

         Loggable --+
                    |
  Factory --+       |
            |       |
ClientFactory --+   |
                |   |
  PBClientFactory --+
                    |
                   JobClientFactory


I am a client factory that logs in to the WorkerBrain. I live in the flumotion-job process spawned by the worker.
Method Summary
  __init__(self, id)
  buildProtocol(self, addr)
Create an instance of a subclass of Protocol.
  login(self, *args, **kwargs)
  stopFactory(self)
This will be called before I stop listening on all Ports/Connectors.
    Inherited from PBClientFactory
  clientConnectionFailed(self, connector, reason)
Called when a connection has failed to connect.
  clientConnectionLost(self, connector, reason, reconnecting)
Reconnecting subclasses should call with reconnecting=1.
  clientConnectionMade(self, broker)
  disconnect(self)
If the factory is connected, close the connection.
  getPerspective(self, username, password, serviceName, perspectiveName, client)
Get perspective from remote PB server.
  getRootObject(self)
Get root object of remote PB server.
    Inherited from ClientFactory
  startedConnecting(self, connector)
Called when a connection has been started.
    Inherited from Factory
  doStart(self)
Make sure startFactory is called.
  doStop(self)
Make sure stopFactory is called.
  startFactory(self)
This will be called before I begin listening on a Port or Connector.
    Inherited from Loggable
  debug(self, *args)
Log a debug message.
dict doLog(self, level, where, format, *args, **kwargs)
Log a message at the given level, with the possibility of going higher up in the stack.
  error(self, *args)
Log an error.
  info(self, *args)
Log an informational message.
  log(self, *args)
Log a log message.
  logFunction(self, *args)
Overridable log function.
  logObjectName(self)
Overridable object name function.
  warning(self, *args)
Log a warning.
  warningFailure(self, failure, swallow)
Log a warning about a Failure.

Class Variable Summary
str logCategory: Implementors can provide a category to log their messages under.
JobMedium medium: the medium for the JobHeaven to access us through
InterfaceClass perspectiveInterface = <InterfaceClass flumotion.common....
    Inherited from PBClientFactory
int unsafeTracebacks = 0                                                                     
    Inherited from Factory
Implements __implemented__ = <implementedBy twisted.internet.protoc...
ClassProvides __providedBy__ = <zope.interface.declarations.ClassProvi...
ClassProvides __provides__ = <zope.interface.declarations.ClassProvide...
bool noisy = True
int numPorts = 0                                                                     
NoneType protocol = None                                                                  

Method Details

__init__(self, id)
(Constructor)

Parameters:
id - the avatar id used for logging into the workerbrain
           (type=str)
Overrides:
twisted.spread.pb.PBClientFactory.__init__

buildProtocol(self, addr)

Create an instance of a subclass of Protocol.

The returned instance will handle input on an incoming server connection, and an attribute "factory" pointing to the creating factory.

Override this method to alter how Protocol instances get created.
Parameters:
addr - an object implementing twisted.internet.interfaces.IAddress
Overrides:
twisted.internet.protocol.Factory.buildProtocol (inherited documentation)

stopFactory(self)

This will be called before I stop listening on all Ports/Connectors.

This can be overridden to perform 'shutdown' tasks such as disconnecting database connections, closing files, etc.

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.
Overrides:
twisted.internet.protocol.Factory.stopFactory (inherited documentation)

Class Variable Details

logCategory

Implementors can provide a category to log their messages under.
Type:
str
Value:
'job'                                                                  

medium

the medium for the JobHeaven to access us through
Type:
JobMedium

perspectiveInterface

Type:
InterfaceClass
Value:
<InterfaceClass flumotion.common.interfaces.IJobMedium>                

Generated by Epydoc 2.1 on Sat Apr 14 13:16:07 2007 http://epydoc.sf.net