|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.netscape.jndi.ldap.LdapService
Ldap Service encapsulates a Ldap connection and Ldap operations over the connection. The connection is established in a lazy manner, first time a Ldap operation is initiated. A Ldap Service object is shared by multiple contexts. The object maintains a reference counter which is incremented when a context is cloned, and decremeneted when a context is closed. The associated Ldap Connection is relased when the reference counter reaches zero. LDAPsearchConstraints are always read from a context, because ldap service is a shared object and each context may request different search constraints.
Field Summary | |
static java.lang.String |
DEFAULT_FILTER
|
static java.lang.String |
DEFAULT_HOST
|
static int |
DEFAULT_PORT
|
static int |
DEFAULT_SCOPE
|
static int |
DEFAULT_SSL_PORT
|
Constructor Summary | |
LdapService()
|
Method Summary | |
(package private) LdapContextImpl |
addEntry(LdapContextImpl ctx,
java.lang.String name,
LDAPAttributeSet attrs)
Create a new LDAP entry |
(package private) void |
changeRDN(LdapContextImpl ctx,
java.lang.String name,
java.lang.String newRDN)
Chanage RDN for a LDAP entry |
(package private) void |
connect(LdapContextImpl ctx)
Connect to the server and send bind request to authenticate the user |
(package private) void |
delEntry(LdapContextImpl ctx,
java.lang.String name)
Delete a LDAP entry |
(package private) void |
disconnect()
Physically disconect only if the client count is zero |
protected void |
finalize()
|
(package private) LDAPConnection |
getConnection()
|
(package private) EventService |
getEventService(LdapContextImpl ctx)
Return the event service |
(package private) javax.naming.directory.DirContext |
getSchema(LdapContextImpl ctx,
java.lang.String name)
Schema Operations |
(package private) void |
incrementClientCount()
Increment client count |
(package private) boolean |
isConnected()
|
(package private) javax.naming.NamingEnumeration |
listEntries(LdapContextImpl ctx,
java.lang.String name,
boolean returnBindings)
List child entries using LDAP lookup operation |
(package private) java.lang.Object |
lookup(LdapContextImpl ctx,
java.lang.String name)
Lookup an entry using LDAP search operation |
(package private) void |
modifyEntry(LdapContextImpl ctx,
java.lang.String name,
LDAPModificationSet mods)
Modify LDAP entry attributes |
(package private) javax.naming.directory.Attributes |
readAttrs(LdapContextImpl ctx,
java.lang.String name,
java.lang.String[] attrs)
Read LDAP entry attributes |
(package private) javax.naming.NamingEnumeration |
search(LdapContextImpl ctx,
java.lang.String name,
java.lang.String filter,
java.lang.String[] attrs,
javax.naming.directory.SearchControls jndiCtrls)
LDAP search operation |
(package private) void |
setTraceOutput(java.lang.Object out)
Enable/Disable ldap message trace. |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String DEFAULT_FILTER
public static final int DEFAULT_SCOPE
public static final java.lang.String DEFAULT_HOST
public static final int DEFAULT_PORT
public static final int DEFAULT_SSL_PORT
Constructor Detail |
public LdapService()
Method Detail |
LDAPConnection getConnection()
void connect(LdapContextImpl ctx) throws javax.naming.NamingException
javax.naming.NamingException
protected void finalize()
boolean isConnected()
void disconnect()
void incrementClientCount()
javax.naming.NamingEnumeration search(LdapContextImpl ctx, java.lang.String name, java.lang.String filter, java.lang.String[] attrs, javax.naming.directory.SearchControls jndiCtrls) throws javax.naming.NamingException
javax.naming.NamingException
javax.naming.NamingEnumeration listEntries(LdapContextImpl ctx, java.lang.String name, boolean returnBindings) throws javax.naming.NamingException
javax.naming.NamingException
java.lang.Object lookup(LdapContextImpl ctx, java.lang.String name) throws javax.naming.NamingException
javax.naming.NamingException
javax.naming.directory.Attributes readAttrs(LdapContextImpl ctx, java.lang.String name, java.lang.String[] attrs) throws javax.naming.NamingException
javax.naming.NamingException
void modifyEntry(LdapContextImpl ctx, java.lang.String name, LDAPModificationSet mods) throws javax.naming.NamingException
javax.naming.NamingException
LdapContextImpl addEntry(LdapContextImpl ctx, java.lang.String name, LDAPAttributeSet attrs) throws javax.naming.NamingException
javax.naming.NamingException
void delEntry(LdapContextImpl ctx, java.lang.String name) throws javax.naming.NamingException
javax.naming.NamingException
void changeRDN(LdapContextImpl ctx, java.lang.String name, java.lang.String newRDN) throws javax.naming.NamingException
javax.naming.NamingException
javax.naming.directory.DirContext getSchema(LdapContextImpl ctx, java.lang.String name) throws javax.naming.NamingException
javax.naming.NamingException
EventService getEventService(LdapContextImpl ctx) throws javax.naming.NamingException
javax.naming.NamingException
void setTraceOutput(java.lang.Object out) throws javax.naming.NamingException
out
- Trace output or null (disable trace). Output can
be specified as a file name or a java OutputStream. If an
empty string is specified, the output is sent to System.err.
A file name prefixed with a '+' will open the file in append mode.
javax.naming.NamingException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |