Package ldaptor :: Module inmemory :: Class InMemoryLDIFProtocol
[hide private]
[frames] | no frames]

Class InMemoryLDIFProtocol

source code

                                        object --+    
                                                 |    
twisted.internet.protocol.BaseProtocol --+       |    
                                         |       |    
        twisted.internet.protocol.Protocol --+   |    
                                             |   |    
   twisted.protocols.basic._PauseableMixin --+   |    
                                             |   |    
          twisted.protocols.basic.LineReceiver --+    
                                                 |    
                  protocols.ldap.ldifprotocol.LDIF --+
                                                     |
                                                    InMemoryLDIFProtocol

Receive LDIF data and gather results into an ReadOnlyInMemoryLDAPEntry.

You can override lookupFailed and addFailed to provide smarter error handling. They are called as Deferred errbacks; returning the reason causes error to pass onward and abort the whole operation. Returning None from lookupFailed skips that entry, but continues loading.

When the full LDIF data has been read, the completed Deferred will trigger.

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
_addEntry(self, db, entry) source code
 
gotEntry(self, entry) source code
 
lookupFailed(self, reason, entry) source code
 
addFailed(self, reason, entry) source code
 
connectionLost(self, reason)
Called when the connection is shut down.
source code

Inherited from protocols.ldap.ldifprotocol.LDIF: lineReceived, logicalLineReceived, parseValue, state_HEADER, state_IN_ENTRY, state_WAIT_FOR_DN

Inherited from protocols.ldap.ldifprotocol.LDIF (private): _parseLine

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Inherited from twisted.protocols.basic.LineReceiver: __provides__, clearLineBuffer, dataReceived, lineLengthExceeded, rawDataReceived, sendLine, setLineMode, setRawMode

Inherited from twisted.internet.protocol.Protocol: logPrefix

Inherited from twisted.internet.protocol.BaseProtocol: __providedBy__, connectionMade, makeConnection

Inherited from twisted.protocols.basic._PauseableMixin: pauseProducing, resumeProducing, stopProducing

Class Variables [hide private]

Inherited from protocols.ldap.ldifprotocol.LDIF: data, delimiter, dn, lastLine, mode, version

Inherited from twisted.protocols.basic.LineReceiver: MAX_LENGTH, __implemented__, line_mode

Inherited from twisted.internet.protocol.BaseProtocol: connected, transport

Inherited from twisted.protocols.basic._PauseableMixin: paused

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

gotEntry(self, entry)

source code 
Overrides: protocols.ldap.ldifprotocol.LDIF.gotEntry

connectionLost(self, reason)

source code 

Called when the connection is shut down.

Clear any circular references here, and any external references to this Protocol. The connection has been closed.

Overrides: twisted.internet.protocol.Protocol.connectionLost
(inherited documentation)