|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.server.ldap.LdapSession
public class LdapSession
An object representing an LdapSession. Any connection established with the LDAP server forms a session.
| Constructor Summary | |
|---|---|
LdapSession(org.apache.mina.core.session.IoSession ioSession)
Creates a new instance of LdapSession associated with the underlying connection (MINA IoSession) to the server. |
|
| Method Summary | |
|---|---|
void |
abandonAllOutstandingRequests()
Abandons all outstanding requests associated with this session. |
org.apache.directory.shared.ldap.model.message.AbandonableRequest |
abandonOutstandingRequest(int messageId)
Abandons a specific request by messageId. |
void |
addPagedSearchContext(PagedSearchContext context)
Add a new Paged Search context into the stored context. |
void |
clearSaslProperties()
Clear all the Sasl values stored into the Map |
org.apache.directory.shared.ldap.model.message.BindStatus |
getBindStatus()
|
CoreSession |
getCoreSession()
Gets the logical core DirectoryService session associated with this LdapSession. |
String |
getCurrentMechanism()
Get the mechanism selected by a user during a SASL Bind negotiation. |
org.apache.mina.core.session.IoSession |
getIoSession()
Gets the MINA IoSession associated with this LdapSession. |
LdapServer |
getLdapServer()
|
Map<Integer,org.apache.directory.shared.ldap.model.message.AbandonableRequest> |
getOutstandingRequests()
|
PagedSearchContext |
getPagedSearchContext(int contextId)
Get paged search context associated with an ID |
Object |
getSaslProperty(String property)
Get a Sasl property's value |
boolean |
isAnonymous()
Check if the session is authenticated. |
boolean |
isAuthenticated()
Check if the session is authenticated. |
boolean |
isAuthPending()
Check if the session is processing a BindRequest, either Simple or SASL |
boolean |
isSaslAuthPending()
Check if the session is processing a SASL BindRequest |
boolean |
isSimpleAuthPending()
Check if the session is processing a Simple BindRequest |
void |
putSaslProperty(String property,
Object value)
Add a Sasl property and value |
void |
registerOutstandingRequest(org.apache.directory.shared.ldap.model.message.AbandonableRequest request)
Registers an outstanding request which can be abandoned later. |
PagedSearchContext |
removePagedSearchContext(int contextId)
Remove a Paged Search context from the map storing all of them. |
void |
removeSaslProperty(String property)
Remove a property from the SaslProperty map |
void |
setAnonymous()
Set the current BindStatus to Anonymous |
void |
setAuthenticated()
Set the current BindStatus to authenticated |
void |
setCoreSession(CoreSession coreSession)
Sets the logical core DirectoryService session. |
void |
setLdapServer(LdapServer ldapServer)
Store a reference on the LdapServer intance |
void |
setSaslAuthPending()
Set the current BindStatus to SASL authentication pending |
void |
setSimpleAuthPending()
Set the current BindStatus to Simple authentication pending |
String |
toString()
The principal and remote address associated with this session. |
void |
unregisterOutstandingRequest(org.apache.directory.shared.ldap.model.message.AbandonableRequest request)
Unregisters an outstanding request. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public LdapSession(org.apache.mina.core.session.IoSession ioSession)
ioSession - the MINA session associated this LdapSession| Method Detail |
|---|
public boolean isAuthenticated()
true if the session is not anonymouspublic boolean isAnonymous()
true if the session is not anonymouspublic boolean isAuthPending()
true if the session is in AuthPending statepublic boolean isSimpleAuthPending()
true if the session is in AuthPending statepublic boolean isSaslAuthPending()
true if the session is in AuthPending statepublic org.apache.mina.core.session.IoSession getIoSession()
public CoreSession getCoreSession()
public void setCoreSession(CoreSession coreSession)
coreSession - the logical core DirectoryService sessionpublic void abandonAllOutstandingRequests()
public org.apache.directory.shared.ldap.model.message.AbandonableRequest abandonOutstandingRequest(int messageId)
messageId - The request ID to abandonpublic void registerOutstandingRequest(org.apache.directory.shared.ldap.model.message.AbandonableRequest request)
request - an outstanding request that can be abandonedpublic void unregisterOutstandingRequest(org.apache.directory.shared.ldap.model.message.AbandonableRequest request)
request - the request to unregisterpublic Map<Integer,org.apache.directory.shared.ldap.model.message.AbandonableRequest> getOutstandingRequests()
public org.apache.directory.shared.ldap.model.message.BindStatus getBindStatus()
public void setSimpleAuthPending()
public void setSaslAuthPending()
public void setAnonymous()
public void setAuthenticated()
public String getCurrentMechanism()
public void putSaslProperty(String property,
Object value)
property - the property to addvalue - the value for this propertypublic Object getSaslProperty(String property)
property - the property to get
public void clearSaslProperties()
public void removeSaslProperty(String property)
property - the property to removepublic LdapServer getLdapServer()
public void setLdapServer(LdapServer ldapServer)
ldapServer - the LdapServer instance
public void addPagedSearchContext(PagedSearchContext context)
throws Exception
context - The context to add
Exceptionpublic PagedSearchContext removePagedSearchContext(int contextId)
contextId - The context ID to remove
public PagedSearchContext getPagedSearchContext(int contextId)
contextId - The id for teh context we want to get
public String toString()
toString in class ObjectObject.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||