|
||||||||||
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.
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 |
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 |
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()
|
static SessionRegistry |
getSingleton()
Gets the singleton instance for this SessionRegistry. |
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 |
Method Detail |
---|
public static SessionRegistry getSingleton()
public java.util.Hashtable 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 addpublic 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 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 requestmessageId
- 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
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
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 |