Package ldaptor :: Package protocols :: Package ldap :: Module ldapserver :: Class BaseLDAPServer
[hide private]
[frames] | no frames]

Class BaseLDAPServer

source code

twisted.internet.protocol.BaseProtocol --+    
                                         |    
        twisted.internet.protocol.Protocol --+
                                             |
                                            BaseLDAPServer
Known Subclasses:

Instance Methods [hide private]
 
__init__(self) source code
 
_callErrorHandler(self, name, resultCode, errorMessage) source code
 
_cbHandle(self, response, id) source code
 
_cbLDAPError(self, reason, name) source code
 
_cbOtherError(self, reason, name) source code
 
checkControls(self, controls) source code
 
connectionLost(self, reason=<twisted.python.failure.Failure <class 'twisted.internet.error...)
Called when TCP connection has been lost
source code
 
connectionMade(self)
TCP connection has opened
source code
 
dataReceived(self, recd)
Called whenever data is received.
source code
 
failDefault(self, resultCode, errorMessage) source code
 
handle(self, msg) source code
 
handleUnknown(self, request, controls, callback) source code
 
queue(self, id, op) source code
 
unsolicitedNotification(self, msg) source code

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

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

Class Variables [hide private]
  berdecoder = <LDAPBERDecoderContext_TopLevel identities={0x10:...
  debug = False

Inherited from twisted.internet.protocol.Protocol: __implemented__

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

Method Details [hide private]

connectionLost(self, reason=<twisted.python.failure.Failure <class 'twisted.internet.error...)

source code 

Called when TCP connection has been lost

Overrides: twisted.internet.protocol.Protocol.connectionLost

connectionMade(self)

source code 

TCP connection has opened

Overrides: twisted.internet.protocol.BaseProtocol.connectionMade

dataReceived(self, recd)

source code 

Called whenever data is received.

Use this method to translate to a higher-level message. Usually, some callback will be made upon the receipt of each complete protocol message.

Parameters:
  • data - a string of indeterminate length. Please keep in mind that you will probably need to buffer some data, as partial (or multiple) protocol messages may be received! I recommend that unit tests for protocols call through to this method with differing chunk sizes, down to one byte at a time.
Overrides: twisted.internet.protocol.Protocol.dataReceived
(inherited documentation)

Class Variable Details [hide private]

berdecoder

Value:
<LDAPBERDecoderContext_TopLevel identities={0x10: LDAPMessage} fallbac\
k=None inherit=<LDAPBERDecoderContext_LDAPMessage identities={0x80: LD\
APControls, 0x53: LDAPSearchResultReference} fallback=<LDAPBERDecoderC\
ontext identities={0x40: LDAPBindRequest, 0x41: LDAPBindResponse, 0x42\
: LDAPUnbindRequest, 0x43: LDAPSearchRequest, 0x44: LDAPSearchResultEn\
try, 0x45: LDAPSearchResultDone, 0x46: LDAPModifyRequest, 0x47: LDAPMo\
difyResponse, 0x48: LDAPAddRequest, 0x49: LDAPAddResponse, 0x4a: LDAPD\
elRequest, 0x4b: LDAPDelResponse, 0x4c: LDAPModifyDNRequest, 0x4d: LDA\
...