public class LdapConnection extends AbstractConnection
Modifier and Type | Class and Description |
---|---|
protected class |
LdapConnection.SearchRunnable |
AbstractConnection.LineReaderInputStream, AbstractConnection.State
Thread.UncaughtExceptionHandler
Modifier and Type | Field and Description |
---|---|
protected String |
currentHostName |
protected static byte[] |
EMPTY_BYTE_ARRAY |
protected BufferedInputStream |
is
raw connection inputStream
|
protected BerEncoder |
responseBer
reusable BER encoder
|
protected SaslServer |
saslServer
Sasl server for DIGEST-MD5 authentication
|
protected HashMap<Integer,LdapConnection.SearchRunnable> |
searchThreadMap
Search threads map
|
protected String |
serviceInfo
Cache serviceInfo string value
|
client, in, os, password, session, state, userName
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
LdapConnection(Socket clientSocket)
Initialize the streams and start the thread.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addIf(Map<String,Object> attributes,
Set<String> returningAttributes,
String name,
Object value) |
protected Set<String> |
convertLdapToContactReturningAttributes(Set<String> returningAttributes) |
protected void |
dumpBer(byte[] inbuf,
int offset) |
protected static String |
getContactAttributeName(String ldapAttributeName)
Convert contact attribute name to LDAP attribute name.
|
protected String |
getCurrentHostName() |
protected static String |
getLdapAttributeName(String contactAttributeName)
Convert LDAP attribute name to contact attribute name.
|
protected String |
getServiceInfo() |
protected void |
handleRequest(byte[] inbuf,
int offset) |
protected boolean |
isLdapV3() |
protected davmail.ldap.LdapConnection.LdapFilter |
parseFilter(BerDecoder reqBer) |
protected davmail.ldap.LdapConnection.LdapFilter |
parseNestedFilter(BerDecoder reqBer,
int ldapFilterType,
int end) |
protected Set<String> |
parseReturningAttributes(BerDecoder reqBer) |
protected davmail.ldap.LdapConnection.LdapFilter |
parseSimpleFilter(BerDecoder reqBer,
int ldapFilterOperator) |
void |
run() |
protected void |
sendBaseContext(int currentMessageId)
Send Base Context
|
protected void |
sendClient(int currentMessageId,
int responseOperation,
int status,
String message) |
protected void |
sendComputerContext(int currentMessageId,
Set<String> returningAttributes)
Send ComputerContext
|
protected void |
sendEntry(int currentMessageId,
String dn,
Map<String,Object> attributes) |
protected void |
sendErr(int currentMessageId,
int responseOperation,
Exception e) |
protected void |
sendResponse() |
protected void |
sendRootDSE(int currentMessageId)
Send Root DSE
|
close, logConnection, readClient, sendClient, sendClient, sendClient, sendClient
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
protected SaslServer saslServer
protected BufferedInputStream is
protected final BerEncoder responseBer
protected final HashMap<Integer,LdapConnection.SearchRunnable> searchThreadMap
protected static final byte[] EMPTY_BYTE_ARRAY
protected String currentHostName
protected String serviceInfo
public LdapConnection(Socket clientSocket)
clientSocket
- LDAP client socketprotected boolean isLdapV3()
protected void handleRequest(byte[] inbuf, int offset) throws IOException
IOException
protected void dumpBer(byte[] inbuf, int offset)
protected davmail.ldap.LdapConnection.LdapFilter parseFilter(BerDecoder reqBer) throws IOException
IOException
protected davmail.ldap.LdapConnection.LdapFilter parseNestedFilter(BerDecoder reqBer, int ldapFilterType, int end) throws IOException
IOException
protected davmail.ldap.LdapConnection.LdapFilter parseSimpleFilter(BerDecoder reqBer, int ldapFilterOperator) throws IOException
IOException
protected Set<String> parseReturningAttributes(BerDecoder reqBer) throws IOException
IOException
protected void sendRootDSE(int currentMessageId) throws IOException
currentMessageId
- current message idIOException
- on errorprotected void addIf(Map<String,Object> attributes, Set<String> returningAttributes, String name, Object value)
protected String getCurrentHostName() throws UnknownHostException
UnknownHostException
protected String getServiceInfo() throws UnknownHostException
UnknownHostException
protected void sendComputerContext(int currentMessageId, Set<String> returningAttributes) throws IOException
currentMessageId
- current message idreturningAttributes
- attributes to returnIOException
- on errorprotected void sendBaseContext(int currentMessageId) throws IOException
currentMessageId
- current message idIOException
- on errorprotected void sendEntry(int currentMessageId, String dn, Map<String,Object> attributes) throws IOException
IOException
protected void sendErr(int currentMessageId, int responseOperation, Exception e) throws IOException
IOException
protected void sendClient(int currentMessageId, int responseOperation, int status, String message) throws IOException
IOException
protected void sendResponse() throws IOException
IOException
protected static String getContactAttributeName(String ldapAttributeName)
ldapAttributeName
- ldap attribute nameprotected static String getLdapAttributeName(String contactAttributeName)
contactAttributeName
- ldap attribute nameCopyright © 2001–2024 MickaĆ«l Guessant. All rights reserved.