|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Encapsulates a connection to an LDAP server, providing access to the input queue for messages received.
Method Summary | |
void |
abandon(int id)
Cancels the ldap request with the specified id and discards any results already received. |
void |
abandon(LDAPSearchListener searchlistener)
Cancels all outstanding search requests associated with this LDAPSearchListener object and discards any results already received. |
LDAPResponseListener |
add(LDAPEntry entry,
LDAPResponseListener listener)
Adds an entry to the directory. |
LDAPResponseListener |
add(LDAPEntry entry,
LDAPResponseListener listener,
LDAPConstraints cons)
Adds an entry to the directory and allows you to specify constraints for this LDAP add operation by using an LDAPConstraints
object. |
LDAPResponseListener |
bind(java.lang.String dn,
java.lang.String passwd,
LDAPResponseListener listener)
Authenticates to the LDAP server (that the object is currently connected to) using the specified name and password. |
LDAPResponseListener |
bind(java.lang.String dn,
java.lang.String passwd,
LDAPResponseListener listener,
LDAPConstraints cons)
Authenticates to the LDAP server (that the object is currently connected to) using the specified name and password and allows you to specify constraints for this LDAP add operation by using an LDAPConstraints object. |
LDAPResponseListener |
compare(java.lang.String dn,
LDAPAttribute attr,
LDAPResponseListener listener)
Compares an attribute value with one in the directory. |
LDAPResponseListener |
compare(java.lang.String dn,
LDAPAttribute attr,
LDAPResponseListener listener,
LDAPConstraints cons)
Compares an attribute value with one in the directory. |
LDAPResponseListener |
delete(java.lang.String dn,
LDAPResponseListener listener)
Deletes the entry for the specified DN from the directory. |
LDAPResponseListener |
delete(java.lang.String dn,
LDAPResponseListener listener,
LDAPConstraints cons)
Deletes the entry for the specified DN from the directory. |
LDAPResponseListener |
modify(java.lang.String dn,
LDAPModification mod,
LDAPResponseListener listener)
Makes a single change to an existing entry in the directory (for example, changes the value of an attribute, adds a new attribute value, or removes an existing attribute value). The LDAPModification object specifies both the change to be made and the LDAPAttribute value to be changed. |
LDAPResponseListener |
modify(java.lang.String dn,
LDAPModification mod,
LDAPResponseListener listener,
LDAPConstraints cons)
Makes a single change to an existing entry in the directory (for example, changes the value of an attribute, adds a new attribute value, or removes an existing attribute value). The LDAPModification object specifies both the change to be made and the LDAPAttribute value to be changed. |
LDAPResponseListener |
modify(java.lang.String dn,
LDAPModificationSet mods,
LDAPResponseListener listener)
Makes a set of changes to an existing entry in the directory (for example, changes attribute values, adds new attribute values, or removes existing attribute values). |
LDAPResponseListener |
modify(java.lang.String dn,
LDAPModificationSet mods,
LDAPResponseListener listener,
LDAPConstraints cons)
Makes a set of changes to an existing entry in the directory (for example, changes attribute values, adds new attribute values, or removes existing attribute values). |
LDAPResponseListener |
rename(java.lang.String dn,
java.lang.String newRdn,
boolean deleteOldRdn,
LDAPResponseListener listener)
Renames an existing entry in the directory. |
LDAPResponseListener |
rename(java.lang.String dn,
java.lang.String newRdn,
boolean deleteOldRdn,
LDAPResponseListener listener,
LDAPConstraints cons)
Renames an existing entry in the directory. |
LDAPSearchListener |
search(java.lang.String base,
int scope,
java.lang.String filter,
java.lang.String[] attrs,
boolean typesOnly,
LDAPSearchListener listener)
Performs the search specified by the criteria that you enter. |
LDAPSearchListener |
search(java.lang.String base,
int scope,
java.lang.String filter,
java.lang.String[] attrs,
boolean typesOnly,
LDAPSearchListener listener,
LDAPSearchConstraints cons)
Performs the search specified by the criteria that you enter. |
Method Detail |
public LDAPResponseListener add(LDAPEntry entry, LDAPResponseListener listener) throws LDAPException
entry
- LDAPEntry object specifying the distinguished name and
attributes of the new entrylistener
- handler for messages returned from a server in response
to this request. If it is null, a listener object is created internally.cons
- constraints specific to the operationLDAPEntry
,
LDAPResponseListener
public LDAPResponseListener add(LDAPEntry entry, LDAPResponseListener listener, LDAPConstraints cons) throws LDAPException
LDAPConstraints
object. For example, you can specify whether or not to follow referrals.
You can also apply LDAP v3 controls to the operation.
entry
- LDAPEntry object specifying the distinguished name and
attributes of the new entrylistener
- handler for messages returned from a server in response
to this request. If it is null, a listener object is created internally.cons
- constraints specific to the operationLDAPEntry
,
LDAPResponseListener
,
LDAPConstraints
public LDAPResponseListener bind(java.lang.String dn, java.lang.String passwd, LDAPResponseListener listener) throws LDAPException
dn
- if non-null and non-empty, specifies that the connection
and all operations through it should be authenticated with dn as the
distinguished namepasswd
- if non-null and non-empty, specifies that the connection
and all operations through it should be authenticated with dn as the
distinguished name and passwd as passwordlistener
- handler for messages returned from a server in response
to this request. If it is null, a listener object is created internally.LDAPResponseListener
public LDAPResponseListener bind(java.lang.String dn, java.lang.String passwd, LDAPResponseListener listener, LDAPConstraints cons) throws LDAPException
LDAPConstraints
object. If the object
has been disconnected from an LDAP server, this method attempts to
reconnect to the server. If the object had already authenticated, the
old authentication is discarded.dn
- if non-null and non-empty, specifies that the connection
and all operations through it should be authenticated with dn as the
distinguished namepasswd
- if non-null and non-empty, specifies that the connection
and all operations through it should be authenticated with dn as the
distinguished name and passwd as passwordlistener
- handler for messages returned from a server in response
to this request. If it is null, a listener object is created internally.cons
- constraints specific to the operationLDAPResponseListener
,
LDAPConstraints
public LDAPResponseListener delete(java.lang.String dn, LDAPResponseListener listener) throws LDAPException
dn
- distinguished name of the entry to deletelistener
- handler for messages returned from a server in response
to this request. If it is null, a listener object is created internally.LDAPResponseListener
,
LDAPConstraints
public LDAPResponseListener delete(java.lang.String dn, LDAPResponseListener listener, LDAPConstraints cons) throws LDAPException
dn
- distinguished name of the entry to deletelistener
- handler for messages returned from a server in response
to this request. If it is null, a listener object is created internally.cons
- constraints specific to the operationLDAPResponseListener
,
LDAPConstraints
public LDAPResponseListener modify(java.lang.String dn, LDAPModification mod, LDAPResponseListener listener) throws LDAPException
dn
- distinguished name of the entry to modifymod
- a single change to make to an entrylistener
- handler for messages returned from a server in response
to this request. If it is null, a listener object is created internally.LDAPModification
,
LDAPResponseListener
public LDAPResponseListener modify(java.lang.String dn, LDAPModification mod, LDAPResponseListener listener, LDAPConstraints cons) throws LDAPException
dn
- distinguished name of the entry to modifymod
- a single change to make to an entrylistener
- handler for messages returned from a server in response
to this request. If it is null, a listener object is created internally.cons
- constraints specific to the operationLDAPModification
,
LDAPResponseListener
,
LDAPConstraints
public LDAPResponseListener modify(java.lang.String dn, LDAPModificationSet mods, LDAPResponseListener listener) throws LDAPException
dn
- distinguished name of the entry to modifymods
- a set of modifications to make to the entrylistener
- handler for messages returned from a server in response
to this request. If it is null, a listener object is created internally.LDAPModificationSet
,
LDAPResponseListener
public LDAPResponseListener modify(java.lang.String dn, LDAPModificationSet mods, LDAPResponseListener listener, LDAPConstraints cons) throws LDAPException
dn
- distinguished name of the entry to modifymods
- a set of modifications to make to the entrylistener
- handler for messages returned from a server in response
to this request. If it is null, a listener object is created internally.cons
- constraints specific to the operationLDAPModificationSet
,
LDAPResponseListener
,
LDAPConstraints
public LDAPResponseListener rename(java.lang.String dn, java.lang.String newRdn, boolean deleteOldRdn, LDAPResponseListener listener) throws LDAPException
dn
- current distinguished name of the entrynewRdn
- new relative distinguished name for the entrydeleteOldRdn
- if true
, the old name is not retained as an
attribute valuelistener
- handler for messages returned from a server in response
to this request. If it is null, a listener object is created internally.LDAPResponseListener
public LDAPResponseListener rename(java.lang.String dn, java.lang.String newRdn, boolean deleteOldRdn, LDAPResponseListener listener, LDAPConstraints cons) throws LDAPException
dn
- current distinguished name of the entrynewRdn
- new relative distinguished name for the entrydeleteOldRdn
- if true
, the old name is not retained as an
attribute valuelistener
- handler for messages returned from a server in response
to this request. If it is null, a listener object is created internally.cons
- constraints specific to the operationLDAPResponseListener
,
LDAPConstraints
public LDAPSearchListener search(java.lang.String base, int scope, java.lang.String filter, java.lang.String[] attrs, boolean typesOnly, LDAPSearchListener listener) throws LDAPException
To abandon the search, use the abandon
method.
base
- the base distinguished name from which to searchscope
- the scope of the entries to search. You can specify one
of the following:
LDAPv2.SCOPE_BASE
(search only the base DN)
LDAPv2.SCOPE_ONE
(search only those entries that are one level below the base DN)
LDAPv2.SCOPE_SUB
(search the base DN and all entries within its subtree)
filter
- search filter specifying the search criteriaattrs
- list of attributes to return in the search resultstypesOnly
- if true
, returns the names but not the values of the
attributes found. If false
, returns the names and values of the
attributes found.listener
- handler for messages returned from a server in response
to this request. If it is null, a listener object is created internally.abandon(netscape.ldap.LDAPSearchListener)
public LDAPSearchListener search(java.lang.String base, int scope, java.lang.String filter, java.lang.String[] attrs, boolean typesOnly, LDAPSearchListener listener, LDAPSearchConstraints cons) throws LDAPException
To abandon the search, use the abandon
method.
base
- the base distinguished name from which to searchscope
- the scope of the entries to search. You can specify one
of the following:
LDAPv2.SCOPE_BASE
(search only the base DN)
LDAPv2.SCOPE_ONE
(search only those entries that are one level below the base DN)
LDAPv2.SCOPE_SUB
(search the base DN and all entries within its subtree)
filter
- search filter specifying the search criteriaattrs
- list of attributes to return in the search resultstypesOnly
- if true
, returns the names but not the values of the
attributes found. If false
, returns the names and values for
attributes found.listener
- handler for messages returned from a server in response
to this request. If it is null, a listener object is created internally.cons
- constraints specific to this search (for example, the
maximum number of entries to return)abandon(netscape.ldap.LDAPSearchListener)
public LDAPResponseListener compare(java.lang.String dn, LDAPAttribute attr, LDAPResponseListener listener) throws LDAPException
getResultCode
on the
LDAPResponse
from the LDAPResponseListener
.
The code will be LDAPException.COMPARE_TRUE
or
LDAPException.COMPARE_FALSE
.dn
- distinguished name of the entry to compareattr
- attribute with a value to comparelistener
- handler for messages returned from a server in response
to the specified request. If it is null, a listener object is created internally.public LDAPResponseListener compare(java.lang.String dn, LDAPAttribute attr, LDAPResponseListener listener, LDAPConstraints cons) throws LDAPException
getResultCode
on the
LDAPResponse
from the LDAPResponseListener
.
The code will be LDAPException.COMPARE_TRUE
or
LDAPException.COMPARE_FALSE
.dn
- distinguished name of the entry to compareattr
- attribute with a value to comparelistener
- handler for messages returned from a server in response
to the specified request. If it is null, a listener object is created internally.cons
- constraints specific to this operationpublic void abandon(int id) throws LDAPException
id
- an LDAP request IDpublic void abandon(LDAPSearchListener searchlistener) throws LDAPException
searchlistener
- a search listener returned from a search
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |