|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.server.ldap.SessionRegistry
public class SessionRegistry
A client session state based on JNDI contexts.
| Constructor Summary | |
|---|---|
SessionRegistry(LdapServer ldapServer,
java.util.Hashtable<java.lang.String,java.lang.Object> env)
Creates a singleton session state object for the system. |
|
| Method Summary | |
|---|---|
void |
addOutstandingRequest(org.apache.mina.common.IoSession session,
org.apache.directory.shared.ldap.message.Request req)
Adds a request to the map of outstanding requests for a session. |
java.util.Hashtable<java.lang.String,java.lang.Object> |
getEnvironmentByCopy()
Gets a cloned copy of the environment associated with this registry. |
javax.naming.ldap.LdapContext |
getLdapContext(org.apache.mina.common.IoSession session,
javax.naming.ldap.Control[] connCtls,
boolean allowAnonymous)
Gets the InitialContext to the root of the system that was gotten for client. |
javax.naming.ldap.LdapContext |
getLdapContextOnRootDSEAccess(org.apache.mina.common.IoSession session,
javax.naming.ldap.Control[] connCtls)
Gets the InitialContext to the root of the system that was gotten for client ONLY to be used for RootDSE Search operations. |
org.apache.directory.shared.ldap.message.Request |
getOutstandingRequest(org.apache.mina.common.IoSession session,
int abandonedId)
Overload that does not require boxing of primitive messageId. |
org.apache.directory.shared.ldap.message.Request |
getOutstandingRequest(org.apache.mina.common.IoSession session,
java.lang.Integer id)
Gets an outstanding request by messageId for a session. |
java.util.Map<java.lang.Integer,org.apache.directory.shared.ldap.message.Request> |
getOutstandingRequests(org.apache.mina.common.IoSession session)
Returns a shallow copied map of all outstanding requests for an IoSession. |
org.apache.mina.common.IoSession[] |
getSessions()
|
void |
remove(org.apache.mina.common.IoSession session)
Removes the state mapping a JNDI initial context for the client's key. |
org.apache.directory.shared.ldap.message.Request |
removeOutstandingRequest(org.apache.mina.common.IoSession session,
int messageId)
Overload that does not require boxing of primitive messageId. |
org.apache.directory.shared.ldap.message.Request |
removeOutstandingRequest(org.apache.mina.common.IoSession session,
java.lang.Integer id)
Removes an outstanding request from the session's outstanding request map. |
void |
setLdapContext(org.apache.mina.common.IoSession session,
javax.naming.ldap.LdapContext ictx)
Sets the initial context associated with a newly authenticated client. |
void |
terminateSession(org.apache.mina.common.IoSession session)
Terminates the session by publishing a disconnect event. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SessionRegistry(LdapServer ldapServer,
java.util.Hashtable<java.lang.String,java.lang.Object> env)
ldapServer - the ldap server instanceenv - the properties associated with this SessionRegistry| Method Detail |
|---|
public java.util.Hashtable<java.lang.String,java.lang.Object> getEnvironmentByCopy()
public void addOutstandingRequest(org.apache.mina.common.IoSession session,
org.apache.directory.shared.ldap.message.Request req)
session - the session the request was issued onreq - the request to add
public org.apache.directory.shared.ldap.message.Request removeOutstandingRequest(org.apache.mina.common.IoSession session,
int messageId)
session - the session associated with the requestmessageId - the id of the request
public org.apache.directory.shared.ldap.message.Request removeOutstandingRequest(org.apache.mina.common.IoSession session,
java.lang.Integer id)
session - the session the request is removed fromid - the messageId of the request to remove
public java.util.Map<java.lang.Integer,org.apache.directory.shared.ldap.message.Request> getOutstandingRequests(org.apache.mina.common.IoSession session)
session - the session to get outstanding requests for
public org.apache.directory.shared.ldap.message.Request getOutstandingRequest(org.apache.mina.common.IoSession session,
int abandonedId)
session - the session associated with the requestabandonedId - the id of the request
public org.apache.directory.shared.ldap.message.Request getOutstandingRequest(org.apache.mina.common.IoSession session,
java.lang.Integer id)
session - the LDAP sessionid - the message id of the request
public org.apache.mina.common.IoSession[] getSessions()
public javax.naming.ldap.LdapContext getLdapContext(org.apache.mina.common.IoSession session,
javax.naming.ldap.Control[] connCtls,
boolean allowAnonymous)
throws javax.naming.NamingException
session - the client's keyconnCtls - connection controls if any to use if creating anon contextallowAnonymous - true if anonymous requests will create anonymous
InitialContext if one is not present for the operation
javax.naming.NamingException - if something goes wrong
public javax.naming.ldap.LdapContext getLdapContextOnRootDSEAccess(org.apache.mina.common.IoSession session,
javax.naming.ldap.Control[] connCtls)
throws javax.naming.NamingException
session - the client's keyconnCtls - connection controls if any to use if creating anon context
javax.naming.NamingException - if something goes wrong
public void setLdapContext(org.apache.mina.common.IoSession session,
javax.naming.ldap.LdapContext ictx)
session - the client sessionictx - the initial context gottenpublic void remove(org.apache.mina.common.IoSession session)
session - the client's keypublic void terminateSession(org.apache.mina.common.IoSession session)
session - the client key of the client to disconnect
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||