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 x.__class__.__doc__ 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) 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__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

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

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, line_mode

Inherited from twisted.internet.protocol.Protocol: __implemented__, __provides__

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 x.__class__.__doc__ for signature
Overrides: object.__init__
(inherited documentation)

gotEntry(self, entry)

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

connectionLost(self, reason)

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