public class LdapSessionManager extends Object
LdapProtocolHandler
to manage sessions and is
created by the LdapServer which makes it available to the handler. It's job
is simple and this class was mainly created to be able to expose the session
manager safely to things like the LdapProtocolHandler.
Basically, Ldap sessions are stored in a Map, added or removed when a new connection
is created or deleted. Most of the time, a new operation is processed and the associated
Ldap session is pulled from the map.Constructor and Description |
---|
LdapSessionManager() |
Modifier and Type | Method and Description |
---|---|
void |
addLdapSession(LdapSession ldapSession)
Adds a new LdapSession to the LdapServer.
|
LdapSession |
getLdapSession(org.apache.mina.core.session.IoSession session)
Gets the LdapSession associated with the MINA session.
|
LdapSession[] |
getSessions()
Gets the active sessions managed by the LdapServer.
|
LdapSession |
removeLdapSession(org.apache.mina.core.session.IoSession session)
Removes an LdapSession managed by the
LdapServer . |
public LdapSessionManager()
public LdapSession[] getSessions()
public void addLdapSession(LdapSession ldapSession)
ldapSession
- the newly created LdapSession
public LdapSession removeLdapSession(org.apache.mina.core.session.IoSession session)
LdapServer
. This method
has no side effects: meaning it does not perform cleanup tasks after
removing the session. This task is handled by the callers.session
- the MINA session of the LdapSession to be removedpublic LdapSession getLdapSession(org.apache.mina.core.session.IoSession session)
session
- the MINA session of the LdapSession to retrieveIoSession
Copyright © 2003–2020 The Apache Software Foundation. All rights reserved.