Package flumotion :: Package twisted :: Module fdserver :: Class FDPassingBroker
[show private | hide private]
[frames | no frames]

Class FDPassingBroker

       Ephemeral --+        
                   |        
BaseProtocol --+   |        
               |   |        
        Protocol --+        
                   |        
              Banana --+    
                       |    
                  Broker --+
                           |
                Loggable --+
                           |
                          FDPassingBroker


A pb.Broker subclass that handles FDs being passed to it (with associated data) over the same connection as the normal PB data stream. When an FD is seen, it creates new protocol objects for them from the childFactory attribute.
Method Summary
  __init__(self, childFactory, connectionClass, **kwargs)
  fileDescriptorsReceived(self, fds, message)
    Inherited from Broker
  cachedLocallyAs(self, cid)
  cachedRemotelyAs(self, instance, incref)
Returns an ID that says what this instance is cached as remotely, or None if it's not.
  cacheLocally(self, cid, instance)
(internal)
  cacheRemotely(self, instance)
XXX
  connectionFailed(self)
  connectionLost(self, reason)
The connection was lost.
  connectionReady(self)
Initialize.
  decCacheRef(self, objectID)
(internal) Send a DECACHE directive.
  dontNotifyOnDisconnect(self, notifier)
Remove a callback from list of disconnect callbacks.
  expressionReceived(self, sexp)
Evaluate an expression as it's received.
  localObjectForID(self, luid)
Get a local object for a locally unique ID.
  newLocalID(self)
Generate a new LUID.
  newRequestID(self)
Generate a new request ID.
  notifyOnConnect(self, notifier)
Call the given callback when the Broker connects.
  notifyOnDisconnect(self, notifier)
Call the given callback when the Broker disconnects.
  notifyOnFail(self, notifier)
Call the given callback if the Broker fails to connect.
  pauseProducing(self)
  proto_answer(self, requestID, netResult)
(internal) Got an answer to a previously sent message.
  proto_cachemessage(self, requestID, objectID, message, answerRequired, netArgs, netKw)
  proto_decache(self, objectID)
(internal) Decrement the reference count of a cached object.
  proto_decref(self, objectID)
(internal) Decrement the reference count of an object.
  proto_didNotUnderstand(self, command)
Respond to stock 'didNotUnderstand' message.
  proto_error(self, requestID, fail)
(internal) Deal with an error.
  proto_message(self, requestID, objectID, message, answerRequired, netArgs, netKw)
  proto_uncache(self, objectID)
(internal) Tell the client it is now OK to uncache an object.
  proto_version(self, vnum)
Protocol message: (version version-number)
  registerPageProducer(self, pager)
  registerReference(self, object)
Get an ID for a local object.
  remoteForName(self, name)
Returns an object from the remote name mapping.
  remotelyCachedForLUID(self, luid)
Returns an instance which is cached remotely, with this LUID.
  resumeProducing(self)
Called when the consumer attached to me runs out of buffer.
  sendCall(self, *exp)
Utility method to send an expression to the other side of the connection.
  sendDecRef(self, objectID)
(internal) Send a DECREF directive.
  serialize(self, object, perspective, method, args, kw)
Jelly an object according to the remote security rules for this broker.
  setNameForLocal(self, name, object)
Store a special (string) ID for this object.
  stopProducing(self)
  unserialize(self, sexp, perspective)
Unjelly an sexp according to the local security rules for this broker.
    Inherited from Banana
  callExpressionReceived(self, obj)
  connectionMade(self)
Called when a connection is made.
  dataReceived(self, chunk)
  gotItem(self, item)
  sendEncoded(self, obj)
  setPrefixLimit(self, limit)
Set the prefix limit for decoding done by this protocol instance.
    Inherited from Ephemeral
  __getstate__(self)
  __setstate__(self, state)
    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
    Inherited from Broker
NoneType factory = None                                                                  
int maxBrokerRefsViolations = 0                                                                     
NoneType username = None                                                                  
int version = 6                                                                     
NoneType waitingForAnswers = None                                                                  
    Inherited from Banana
str buffer = ''
dict incomingVocabulary = {1: 'None', 2: 'class', 3: 'derefer...
str k = 'lcache'
list knownDialects = ['pb', 'none']
dict outgoingVocabulary = {'reference': 4, 'uncache': 31, 'mo...
NoneType prefixLimit = None                                                                  
int sizeLimit = 655360                                                                
int v = 18                                                                    
    Inherited from Protocol
Implements __implemented__ = <implementedBy twisted.internet.protoc...
ClassProvides __provides__ = <zope.interface.declarations.ClassProvide...
    Inherited from Loggable
str logCategory: Implementors can provide a category to log their messages under.

Method Details

__init__(self, childFactory, connectionClass, **kwargs)
(Constructor)

Parameters:
connectionClass - a subclass of twisted.internet.tcp.Connection
Overrides:
twisted.spread.pb.Broker.__init__

Generated by Epydoc 2.1 on Fri Apr 6 10:10:24 2007 http://epydoc.sf.net