org.opencrx.application.ldap
Class LDAPSession

java.lang.Object
  extended by org.opencrx.application.adapter.AbstractSession
      extended by org.opencrx.application.ldap.LDAPSession
All Implemented Interfaces:
Runnable

public class LDAPSession
extends AbstractSession

Handle a LDAP session.


Field Summary
protected  InputStream in
           
protected  OutputStream out
           
static int SIZE_LIMIT
           
 
Fields inherited from class org.opencrx.application.adapter.AbstractSession
PASSWORD_ENCODING_ALGORITHM, segmentName, server, socket, username
 
Constructor Summary
LDAPSession(Socket socket, AbstractServer server)
           
 
Method Summary
protected  org.openmdx.portal.servlet.Codes getCodes(javax.jdo.PersistenceManager pm)
           
protected  String getProviderName()
           
protected  void handleRequest(com.sun.jndi.ldap.BerDecoder reqBer)
           
protected  boolean isLdapV3()
           
protected  org.opencrx.application.ldap.LDAPSession.LDAPFilter parseFilter(com.sun.jndi.ldap.BerDecoder reqBer)
           
protected  org.opencrx.application.ldap.LDAPSession.LDAPFilter parseNestedFilter(com.sun.jndi.ldap.BerDecoder reqBer, int ldapFilterType, int end)
           
protected  org.opencrx.application.ldap.LDAPSession.LDAPQuery parseQuery(String dn, com.sun.jndi.ldap.BerDecoder reqBer, javax.jdo.PersistenceManager pm)
           
protected  org.opencrx.application.ldap.LDAPSession.LDAPFilter parseSimpleFilter(com.sun.jndi.ldap.BerDecoder reqBer, int ldapFilterOperator)
           
 void run()
           
protected  void sendClient(int currentMessageId, int responseOperation, int status, String message)
           
protected  void sendEntry(int currentMessageId, String dn, Map<String,Object> attributes)
           
protected  void sendErr(int currentMessageId, int responseOperation, Exception e)
           
protected  void sendResponse(com.sun.jndi.ldap.BerEncoder berEncoder)
           
 void stop()
          Stop session.
 
Methods inherited from class org.opencrx.application.adapter.AbstractSession
login, logout, newPersistenceManager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SIZE_LIMIT

public static final int SIZE_LIMIT
See Also:
Constant Field Values

out

protected OutputStream out

in

protected InputStream in
Constructor Detail

LDAPSession

public LDAPSession(Socket socket,
                   AbstractServer server)
Method Detail

stop

public void stop()
Description copied from class: AbstractSession
Stop session.

Overrides:
stop in class AbstractSession

isLdapV3

protected boolean isLdapV3()

run

public void run()

getProviderName

protected String getProviderName()

getCodes

protected org.openmdx.portal.servlet.Codes getCodes(javax.jdo.PersistenceManager pm)

handleRequest

protected void handleRequest(com.sun.jndi.ldap.BerDecoder reqBer)
                      throws IOException
Throws:
IOException

parseQuery

protected org.opencrx.application.ldap.LDAPSession.LDAPQuery parseQuery(String dn,
                                                                        com.sun.jndi.ldap.BerDecoder reqBer,
                                                                        javax.jdo.PersistenceManager pm)
                                                                 throws IOException
Throws:
IOException

parseFilter

protected org.opencrx.application.ldap.LDAPSession.LDAPFilter parseFilter(com.sun.jndi.ldap.BerDecoder reqBer)
                                                                   throws ServiceException
Throws:
ServiceException

parseNestedFilter

protected org.opencrx.application.ldap.LDAPSession.LDAPFilter parseNestedFilter(com.sun.jndi.ldap.BerDecoder reqBer,
                                                                                int ldapFilterType,
                                                                                int end)
                                                                         throws ServiceException
Throws:
ServiceException

parseSimpleFilter

protected org.opencrx.application.ldap.LDAPSession.LDAPFilter parseSimpleFilter(com.sun.jndi.ldap.BerDecoder reqBer,
                                                                                int ldapFilterOperator)
                                                                         throws ServiceException
Throws:
ServiceException

sendEntry

protected void sendEntry(int currentMessageId,
                         String dn,
                         Map<String,Object> attributes)
                  throws ServiceException
Throws:
ServiceException

sendErr

protected void sendErr(int currentMessageId,
                       int responseOperation,
                       Exception e)
                throws IOException
Throws:
IOException

sendClient

protected void sendClient(int currentMessageId,
                          int responseOperation,
                          int status,
                          String message)
                   throws IOException
Throws:
IOException

sendResponse

protected void sendResponse(com.sun.jndi.ldap.BerEncoder berEncoder)
                     throws IOException
Throws:
IOException


This software is published under the BSD license. Copyright © 2003-2013, CRIXP AG, Switzerland, All rights reserved. Use is subject to license terms.