All LDAP Classes
Internal LDAP Classes

org.ietf.ldap
Class LDAPConnection

java.lang.Object
  extended by org.ietf.ldap.LDAPConnection
All Implemented Interfaces:
java.lang.Cloneable

public class LDAPConnection
extends java.lang.Object
implements java.lang.Cloneable

Represents the central class that encapsulates the connection to a directory server through the LDAP protocol.

See Also:
com.novell.ldap.LDAPLDAPConnection

Nested Class Summary
private static interface LDAPConnection.SocketFactoryWrapper
          Interface for the SocketFactory wrapper class
private  class LDAPConnection.UnsolImpl
          Class to wrap an application's LDAPUnsolicitedNotificationListener
 
Field Summary
static java.lang.String ALL_USER_ATTRS
          Used with search instead of an attribute list to indicate that all attributes are to be returned.
private  LDAPConnection conn
           
static int DEFAULT_PORT
          The default port number for LDAP servers.
static java.lang.String LDAP_PROPERTY_PROTOCOL
          A string that can be passed in to the getProperty method.
static java.lang.String LDAP_PROPERTY_SDK
          A string that can be passed in to the getProperty method.
static java.lang.String LDAP_PROPERTY_SECURITY
          A string that can be passed in to the getProperty method.
private  java.util.Hashtable listenerQueues
           
static java.lang.String NO_ATTRS
          Used with search instead of an attribute list to indicate that no attributes are to be returned.
static int SCOPE_BASE
          Used with search to specify that the scope of entrys to search is to search only the base obect.
static int SCOPE_ONE
          Used with search to specify that the scope of entrys to search is to search only the immediate subordinates of the base obect.
static int SCOPE_SUB
          Used with search to specify that the scope of entrys to search is to search the base object and all entries within its subtree.
static int SCOPE_SUBORDINATESUBTREE
          Used with search to specify that the scope of entrys to search is to search the subordinate subtree object and all entries within it.
 
Constructor Summary
LDAPConnection()
          Constructs a new LDAPConnection object, which represents a connection to an LDAP server.
LDAPConnection(LDAPConnection conn)
          Constructs an LDAPConnection from a com.novell.ldap.LDAPConnection object
LDAPConnection(LDAPSocketFactory factory)
          Constructs a new LDAPConnection object, which will use the supplied class factory to construct a socket connection during LDAPConnection.connect method.
 
Method Summary
 void abandon(int id)
          Abandons an asynchronous operation.
 void abandon(int id, LDAPConstraints cons)
          Abandons a search operation for a queue, using the specified constraints.
 void abandon(LDAPMessageQueue queue)
          Abandons all search operations for a queue.
 void abandon(LDAPMessageQueue queue, LDAPConstraints cons)
          Abandons all search operations for a queue.
 void abandon(LDAPSearchResults results)
          Notifies the server not to send additional results associated with this LDAPSearchResults object, and discards any results already received.
 void abandon(LDAPSearchResults results, LDAPConstraints cons)
          Notifies the server not to send additional results associated with this LDAPSearchResults object, and discards any results already received.
 void add(LDAPEntry entry)
          Synchronously adds an entry to the directory.
 void add(LDAPEntry entry, LDAPConstraints cons)
          Synchronously adds an entry to the directory, using the specified constraints.
 LDAPResponseQueue add(LDAPEntry entry, LDAPResponseQueue queue)
          Asynchronously adds an entry to the directory.
 LDAPResponseQueue add(LDAPEntry entry, LDAPResponseQueue queue, LDAPConstraints cons)
          Asynchronously adds an entry to the directory, using the specified constraints.
 void addUnsolicitedNotificationListener(LDAPUnsolicitedNotificationListener listen)
          Registers an object to be notified on arrival of an unsolicited message from a server.
 void bind(int version, java.lang.String dn, byte[] passwd)
          Authenticates to the LDAP server (that the object is currently connected to) using the specified name, password, and LDAP version.
 void bind(int version, java.lang.String dn, byte[] passwd, LDAPConstraints cons)
          Authenticates to the LDAP server (that the object is currently connected to) using the specified name, password, LDAP version, and constraints.
 LDAPResponseQueue bind(int version, java.lang.String dn, byte[] passwd, LDAPResponseQueue queue)
          Asynchronously authenticates to the LDAP server (that the object is currently connected to) using the specified name, password, LDAP version, and queue.
 LDAPResponseQueue bind(int version, java.lang.String dn, byte[] passwd, LDAPResponseQueue queue, LDAPConstraints cons)
          Asynchronously authenticates to the LDAP server (that the object is currently connected to) using the specified name, password, LDAP version, queue, and constraints.
 void bind(java.lang.String dn, java.lang.String authzid, java.util.Map props, java.lang.Object cbh)
          Authenticates to the LDAP server (that the object is currently connected to) using the specified name and the specified set of mechanisms.
 void bind(java.lang.String dn, java.lang.String authzid, java.util.Map props, java.lang.Object cbh, LDAPConstraints cons)
          Authenticates to the LDAP server (that the object is currently connected to) using the specified name and the specified set of mechanisms.
 void bind(java.lang.String dn, java.lang.String authzid, java.lang.String[] mechanisms, java.util.Map props, java.lang.Object cbh)
          Authenticates to the LDAP server (that the object is currently connected to) using the specified name and the specified set of mechanisms.
 void bind(java.lang.String dn, java.lang.String authzid, java.lang.String[] mechanisms, java.util.Map props, java.lang.Object cbh, LDAPConstraints cons)
          Authenticates to the LDAP server (that the object is currently connected to) using the specified name and the specified set of mechanisms.
 java.lang.Object clone()
          Returns a copy of the object with a private context, but sharing the network connection if there is one.
 boolean compare(java.lang.String dn, LDAPAttribute attr)
          Synchronously checks to see if an entry contains an attribute with a specified value.
 boolean compare(java.lang.String dn, LDAPAttribute attr, LDAPConstraints cons)
          Checks to see if an entry contains an attribute with a specified value, using the specified constraints.
 LDAPResponseQueue compare(java.lang.String dn, LDAPAttribute attr, LDAPResponseQueue queue)
          Asynchronously compares an attribute value with one in the directory, using the specified queue.
 LDAPResponseQueue compare(java.lang.String dn, LDAPAttribute attr, LDAPResponseQueue queue, LDAPConstraints cons)
          Asynchronously compares an attribute value with one in the directory, using the specified queue and contraints.
 void connect(java.lang.String host, int port)
          Connects to the specified host and port
 void delete(java.lang.String dn)
          Synchronously deletes the entry with the specified distinguished name from the directory.
 void delete(java.lang.String dn, LDAPConstraints cons)
          Synchronously deletes the entry with the specified distinguished name from the directory, using the specified constraints.
 LDAPResponseQueue delete(java.lang.String dn, LDAPResponseQueue queue)
          Asynchronously deletes the entry with the specified distinguished name from the directory and returns the results to the specified queue.
 LDAPResponseQueue delete(java.lang.String dn, LDAPResponseQueue queue, LDAPConstraints cons)
          Asynchronously deletes the entry with the specified distinguished name from the directory, using the specified contraints and queue.
 void disconnect()
          Synchronously disconnects from the LDAP server.
 void disconnect(LDAPConstraints cons)
          Synchronously disconnects from the LDAP server, including constraints to send with the unbind request.
 LDAPExtendedResponse extendedOperation(LDAPExtendedOperation op)
          Provides a synchronous means to access extended, non-mandatory operations offered by a particular LDAPv3 compliant server.
 LDAPResponseQueue extendedOperation(LDAPExtendedOperation op, LDAPResponseQueue queue)
          Provides an asynchronous means to access extended, non-mandatory operations offered by a particular LDAPv3 compliant server.
 LDAPExtendedResponse extendedOperation(LDAPExtendedOperation op, LDAPSearchConstraints cons)
          Provides a synchronous means to access extended, non-mandatory operations offered by a particular LDAPv3 compliant server.
 LDAPResponseQueue extendedOperation(LDAPExtendedOperation op, LDAPSearchConstraints cons, LDAPResponseQueue queue)
          Provides an asynchronous means to access extended, non-mandatory operations offered by a particular LDAPv3 compliant server.
 LDAPSchema fetchSchema(java.lang.String schemaDN)
          Retrieves the schema associated with a particular schema DN in the Directory server.
protected  void finalize()
          Closes the connection, if open, and releases any other resources held by the object.
 java.lang.String getAuthenticationDN()
          Returns the distinguished name (DN) used for authentication by this object.
 java.lang.String getAuthenticationMethod()
          Returns the method used to authenticate the connection.
 LDAPConstraints getConstraints()
          Returns a copy of the set of constraints associated with this connection.
 java.lang.String getHost()
          Returns the host name of the LDAP server to which the object is or was last connected, in the format originally specified.
 int getPort()
          Returns the port number of the LDAP server to which the object is or was last connected.
 java.lang.Object getProperty(java.lang.String name)
          Returns a property of a connection object.
 int getProtocolVersion()
          Returns the protocol version uses to authenticate
 LDAPControl[] getResponseControls()
          Returns the Server Controls associated with the most recent response to a synchronous request on this connection object.
 java.lang.Object getSaslBindCallbackHandler()
          Returns the call back handler if any specified on binding with a SASL mechanism.
 java.util.Map getSaslBindProperties()
          Returns the properties if any specified on binding with a SASL mechanism.
 java.lang.String getSchemaDN()
          Retrieves the DN for the schema at the root DSE of the Directory Server.
 java.lang.String getSchemaDN(java.lang.String entryDN)
          Retrieves the DN of the schema associated with a particular entry in the directory.
 LDAPSearchConstraints getSearchConstraints()
          Returns a copy of the set of search constraints associated with this connection.
 LDAPSocketFactory getSocketFactory()
          Returns the LDAPSocketFactory used to establish this server connection.
private static LDAPSocketFactory getSocketImpl(LDAPSocketFactory f)
          Gets an instance of a com.novell.ldap.LDAPSocketFactory wrapping an org.ietf.ldap.LDAPSocketFactory.
(package private)  LDAPConnection getWrappedObject()
          Creates an LDAPConnection from a com.novell.ldap.LDAPConnection object
 boolean isBound()
          Indicates whether the object has authenticated to the connected LDAP server.
 boolean isConnected()
          Indicates whether the connection represented by this object is open at this time.
 boolean isTLS()
          Indicates if the connection uses TLS.
 void modify(java.lang.String dn, LDAPModification mod)
          Synchronously makes a single change to an existing entry in the directory.
 void modify(java.lang.String dn, LDAPModification[] mods)
          Synchronously makes a set of changes to an existing entry in the directory.
 void modify(java.lang.String dn, LDAPModification[] mods, LDAPConstraints cons)
          Synchronously makes a set of changes to an existing entry in the directory, using the specified constraints.
 LDAPResponseQueue modify(java.lang.String dn, LDAPModification[] mods, LDAPResponseQueue queue)
          Asynchronously makes a set of changes to an existing entry in the directory.
 LDAPResponseQueue modify(java.lang.String dn, LDAPModification[] mods, LDAPResponseQueue queue, LDAPConstraints cons)
          Asynchronously makes a set of changes to an existing entry in the directory, using the specified constraints and queue.
 void modify(java.lang.String dn, LDAPModification mod, LDAPConstraints cons)
          Synchronously makes a single change to an existing entry in the directory, using the specified constraints.
 LDAPResponseQueue modify(java.lang.String dn, LDAPModification mod, LDAPResponseQueue queue)
          Asynchronously makes a single change to an existing entry in the directory.
 LDAPResponseQueue modify(java.lang.String dn, LDAPModification mod, LDAPResponseQueue queue, LDAPConstraints cons)
          Asynchronously makes a single change to an existing entry in the directory, using the specified constraints and queue.
static LDAPEntry read(LDAPUrl toGet)
          Synchronously reads the entry specified by the LDAP URL.
static LDAPEntry read(LDAPUrl toGet, LDAPSearchConstraints cons)
          Synchronously reads the entry specified by the LDAP URL, using the specified constraints.
 LDAPEntry read(java.lang.String dn)
          Synchronously reads the entry for the specified distiguished name (DN) and retrieves all attributes for the entry.
 LDAPEntry read(java.lang.String dn, LDAPSearchConstraints cons)
          Synchronously reads the entry for the specified distiguished name (DN), using the specified constraints, and retrieves all attributes for the entry.
 LDAPEntry read(java.lang.String dn, java.lang.String[] attrs)
          Synchronously reads the entry for the specified distinguished name (DN) and retrieves only the specified attributes from the entry.
 LDAPEntry read(java.lang.String dn, java.lang.String[] attrs, LDAPSearchConstraints cons)
          Synchronously reads the entry for the specified distinguished name (DN), using the specified constraints, and retrieves only the specified attributes from the entry.
 void removeUnsolicitedNotificationListener(LDAPUnsolicitedNotificationListener queue)
          Deregisters an object so that it will no longer be notified on arrival of an unsolicited message from a server.
 void rename(java.lang.String dn, java.lang.String newRdn, boolean deleteOldRdn)
          Synchronously renames an existing entry in the directory.
 void rename(java.lang.String dn, java.lang.String newRdn, boolean deleteOldRdn, LDAPConstraints cons)
          Synchronously renames an existing entry in the directory, using the specified constraints.
 LDAPResponseQueue rename(java.lang.String dn, java.lang.String newRdn, boolean deleteOldRdn, LDAPResponseQueue queue)
          Asynchronously renames an existing entry in the directory.
 LDAPResponseQueue rename(java.lang.String dn, java.lang.String newRdn, boolean deleteOldRdn, LDAPResponseQueue queue, LDAPConstraints cons)
          Asynchronously renames an existing entry in the directory, using the specified constraints.
 void rename(java.lang.String dn, java.lang.String newRdn, java.lang.String newParentdn, boolean deleteOldRdn)
          Synchronously renames an existing entry in the directory, possibly repositioning the entry in the directory tree.
 void rename(java.lang.String dn, java.lang.String newRdn, java.lang.String newParentdn, boolean deleteOldRdn, LDAPConstraints cons)
          Synchronously renames an existing entry in the directory, using the specified constraints and possibly repositioning the entry in the directory tree.
 LDAPResponseQueue rename(java.lang.String dn, java.lang.String newRdn, java.lang.String newParentdn, boolean deleteOldRdn, LDAPResponseQueue queue)
          Asynchronously renames an existing entry in the directory, possibly repositioning the entry in the directory.
 LDAPResponseQueue rename(java.lang.String dn, java.lang.String newRdn, java.lang.String newParentdn, boolean deleteOldRdn, LDAPResponseQueue queue, LDAPConstraints cons)
          Asynchronously renames an existing entry in the directory, using the specified constraints and possibily repositioning the entry in the directory.
static LDAPSearchResults search(LDAPUrl toGet)
          Synchronously performs the search specified by the LDAP URL, returning an enumerable LDAPSearchResults object.
static LDAPSearchResults search(LDAPUrl toGet, LDAPSearchConstraints cons)
          Synchronously perfoms the search specified by the LDAP URL, using the specified search constraints.
 LDAPSearchResults search(java.lang.String base, int scope, java.lang.String filter, java.lang.String[] attrs, boolean typesOnly)
          Synchronously performs the search specified by the parameters.
 LDAPSearchResults search(java.lang.String base, int scope, java.lang.String filter, java.lang.String[] attrs, boolean typesOnly, LDAPSearchConstraints cons)
          Synchronously performs the search specified by the parameters, using the specified search constraints.
 LDAPSearchQueue search(java.lang.String base, int scope, java.lang.String filter, java.lang.String[] attrs, boolean typesOnly, LDAPSearchQueue queue)
          Asynchronously performs the search specified by the parameters.
 LDAPSearchQueue search(java.lang.String base, int scope, java.lang.String filter, java.lang.String[] attrs, boolean typesOnly, LDAPSearchQueue queue, LDAPSearchConstraints cons)
          Asynchronously performs the search specified by the parameters, also allowing specification of constraints for the search.
 void setConstraints(LDAPConstraints cons)
          Sets the constraints that apply to all operations performed through this connection.
static void setSocketFactory(LDAPSocketFactory factory)
          Establishes the default LDAPSocketFactory used when LDAPConnection objects are constructed.
 void startTLS()
          Starts Transport Layer Security (TLS) protocol on this connection to enable session privacy.
 void stopTLS()
          Stops Transport Layer Security (TLS) protocol on this connection.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

conn

private LDAPConnection conn

listenerQueues

private java.util.Hashtable listenerQueues

SCOPE_BASE

public static final int SCOPE_BASE
Used with search to specify that the scope of entrys to search is to search only the base obect.

See Also:
com.novell.ldap.LDAPConnection.SCOPE_BASE, Constant Field Values

SCOPE_ONE

public static final int SCOPE_ONE
Used with search to specify that the scope of entrys to search is to search only the immediate subordinates of the base obect.

See Also:
com.novell.ldap.LDAPConnection.SCOPE_ONE, Constant Field Values

SCOPE_SUB

public static final int SCOPE_SUB
Used with search to specify that the scope of entrys to search is to search the base object and all entries within its subtree.

See Also:
com.novell.ldap.LDAPConnection.SCOPE_SUB, Constant Field Values

SCOPE_SUBORDINATESUBTREE

public static final int SCOPE_SUBORDINATESUBTREE
Used with search to specify that the scope of entrys to search is to search the subordinate subtree object and all entries within it.

See Also:
com.novell.ldap.LDAPConnection.SCOPE_SUBORDINATESUBTREE, Constant Field Values

NO_ATTRS

public static final java.lang.String NO_ATTRS
Used with search instead of an attribute list to indicate that no attributes are to be returned.

See Also:
com.novell.ldap.LDAPConnection.NO_ATTRS, Constant Field Values

ALL_USER_ATTRS

public static final java.lang.String ALL_USER_ATTRS
Used with search instead of an attribute list to indicate that all attributes are to be returned.

See Also:
com.novell.ldap.LDAPConnection.ALL_USER_ATTRS, Constant Field Values

DEFAULT_PORT

public static final int DEFAULT_PORT
The default port number for LDAP servers.

See Also:
com.novell.ldap.LDAPConnection.DEFAULT_PORT, Constant Field Values

LDAP_PROPERTY_SDK

public static final java.lang.String LDAP_PROPERTY_SDK
A string that can be passed in to the getProperty method.

See Also:
com.novell.ldap.LDAPConnection.LDAP_PROPERTY_SDK, Constant Field Values

LDAP_PROPERTY_PROTOCOL

public static final java.lang.String LDAP_PROPERTY_PROTOCOL
A string that can be passed in to the getProperty method.

See Also:
com.novell.ldap.LDAPConnection.LDAP_PROPERTY_PROTOCOL, Constant Field Values

LDAP_PROPERTY_SECURITY

public static final java.lang.String LDAP_PROPERTY_SECURITY
A string that can be passed in to the getProperty method.

See Also:
com.novell.ldap.LDAPConnection.LDAP_PROPERTY_SECURITY, Constant Field Values
Constructor Detail

LDAPConnection

public LDAPConnection()
Constructs a new LDAPConnection object, which represents a connection to an LDAP server.

See Also:
com.novell.ldap.LDAPConnection.LDAPConnection()

LDAPConnection

LDAPConnection(LDAPConnection conn)
Constructs an LDAPConnection from a com.novell.ldap.LDAPConnection object


LDAPConnection

public LDAPConnection(LDAPSocketFactory factory)
Constructs a new LDAPConnection object, which will use the supplied class factory to construct a socket connection during LDAPConnection.connect method.

See Also:
com.novell.ldap.LDAPConnection.LDAPConnection(LDAPSocketFactory)
Method Detail

getWrappedObject

LDAPConnection getWrappedObject()
Creates an LDAPConnection from a com.novell.ldap.LDAPConnection object


getSocketImpl

private static LDAPSocketFactory getSocketImpl(LDAPSocketFactory f)
Gets an instance of a com.novell.ldap.LDAPSocketFactory wrapping an org.ietf.ldap.LDAPSocketFactory. This must be static because we need this functionality from both instance methods and static methods within the class LDAPConnection


clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Returns a copy of the object with a private context, but sharing the network connection if there is one.

Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException
See Also:
com.novell.ldap.LDAPConnection.clone()

finalize

protected void finalize()
                 throws LDAPException
Closes the connection, if open, and releases any other resources held by the object.

Overrides:
finalize in class java.lang.Object
Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.finalize()

getProtocolVersion

public int getProtocolVersion()
Returns the protocol version uses to authenticate

See Also:
com.novell.ldap.LDAPConnection.getProtocolVersion()

getAuthenticationDN

public java.lang.String getAuthenticationDN()
Returns the distinguished name (DN) used for authentication by this object.

See Also:
com.novell.ldap.LDAPConnection.getAuthenticationDN()

getAuthenticationMethod

public java.lang.String getAuthenticationMethod()
Returns the method used to authenticate the connection.

See Also:
com.novell.ldap.LDAPConnection.getAuthenticationMethod()

getSaslBindProperties

public java.util.Map getSaslBindProperties()
Returns the properties if any specified on binding with a SASL mechanism.

See Also:
com.novell.ldap.LDAPConnection.getSaslBindProperties()

getSaslBindCallbackHandler

public java.lang.Object getSaslBindCallbackHandler()
Returns the call back handler if any specified on binding with a SASL mechanism.

See Also:
com.novell.ldap.LDAPConnection.getSaslBindCallbackHandler()

getConstraints

public LDAPConstraints getConstraints()
Returns a copy of the set of constraints associated with this connection.

See Also:
com.novell.ldap.LDAPConnection.getConstraints()

getHost

public java.lang.String getHost()
Returns the host name of the LDAP server to which the object is or was last connected, in the format originally specified.

See Also:
com.novell.ldap.LDAPConnection.getHost()

getPort

public int getPort()
Returns the port number of the LDAP server to which the object is or was last connected.

See Also:
com.novell.ldap.LDAPConnection.getPort()

getProperty

public java.lang.Object getProperty(java.lang.String name)
Returns a property of a connection object.

See Also:
com.novell.ldap.LDAPConnection.getProperty(String)

getSearchConstraints

public LDAPSearchConstraints getSearchConstraints()
Returns a copy of the set of search constraints associated with this connection.

See Also:
com.novell.ldap.LDAPConnection.getSearchConstraints()

getSocketFactory

public LDAPSocketFactory getSocketFactory()
Returns the LDAPSocketFactory used to establish this server connection.

See Also:
com.novell.ldap.LDAPConnection.getSocketFactory()

isBound

public boolean isBound()
Indicates whether the object has authenticated to the connected LDAP server.

See Also:
com.novell.ldap.LDAPConnection.isBound()

isConnected

public boolean isConnected()
Indicates whether the connection represented by this object is open at this time.

See Also:
com.novell.ldap.LDAPConnection.isConnected()

isTLS

public boolean isTLS()
Indicates if the connection uses TLS.

See Also:
com.novell.ldap.LDAPConnection.isTLS()

setConstraints

public void setConstraints(LDAPConstraints cons)
Sets the constraints that apply to all operations performed through this connection.

See Also:
com.novell.ldap.LDAPConnection.setConstraints(LDAPConstraints)

setSocketFactory

public static void setSocketFactory(LDAPSocketFactory factory)
Establishes the default LDAPSocketFactory used when LDAPConnection objects are constructed.

See Also:
com.novell.ldap.LDAPConnection.setSocketFactory(LDAPSocketFactory)

addUnsolicitedNotificationListener

public void addUnsolicitedNotificationListener(LDAPUnsolicitedNotificationListener listen)
Registers an object to be notified on arrival of an unsolicited message from a server.

See Also:
com.novell.ldap.LDAPConnection.addUnsolicitedNotificationListener( LDAPUnsolicitedNotificationListener)

removeUnsolicitedNotificationListener

public void removeUnsolicitedNotificationListener(LDAPUnsolicitedNotificationListener queue)
Deregisters an object so that it will no longer be notified on arrival of an unsolicited message from a server.

See Also:
com.novell.ldap.LDAPConnection.removeUnsolicitedNotificationListener( LDAPUnsolicitedNotificationListener)

startTLS

public void startTLS()
              throws LDAPException
Starts Transport Layer Security (TLS) protocol on this connection to enable session privacy.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.startTLS()

stopTLS

public void stopTLS()
             throws LDAPException
Stops Transport Layer Security (TLS) protocol on this connection.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.stopTLS()

abandon

public void abandon(LDAPSearchResults results)
             throws LDAPException
Notifies the server not to send additional results associated with this LDAPSearchResults object, and discards any results already received.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.abandon(LDAPSearchResults)

abandon

public void abandon(LDAPSearchResults results,
                    LDAPConstraints cons)
             throws LDAPException
Notifies the server not to send additional results associated with this LDAPSearchResults object, and discards any results already received.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.abandon(LDAPSearchResults, LDAPConstraints)

abandon

public void abandon(int id)
             throws LDAPException
Abandons an asynchronous operation.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.abandon(int)

abandon

public void abandon(int id,
                    LDAPConstraints cons)
             throws LDAPException
Abandons a search operation for a queue, using the specified constraints.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.abandon(int, LDAPConstraints)

abandon

public void abandon(LDAPMessageQueue queue)
             throws LDAPException
Abandons all search operations for a queue.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.abandon(LDAPMessageQueue)

abandon

public void abandon(LDAPMessageQueue queue,
                    LDAPConstraints cons)
             throws LDAPException
Abandons all search operations for a queue.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.abandon(LDAPMessageQueue, LDAPConstraints)

add

public void add(LDAPEntry entry)
         throws LDAPException
Synchronously adds an entry to the directory.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.add(LDAPEntry)

add

public void add(LDAPEntry entry,
                LDAPConstraints cons)
         throws LDAPException
Synchronously adds an entry to the directory, using the specified constraints.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.add(LDAPEntry, LDAPConstraints)

add

public LDAPResponseQueue add(LDAPEntry entry,
                             LDAPResponseQueue queue)
                      throws LDAPException
Asynchronously adds an entry to the directory.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.add(LDAPEntry, LDAPResponseQueue)

add

public LDAPResponseQueue add(LDAPEntry entry,
                             LDAPResponseQueue queue,
                             LDAPConstraints cons)
                      throws LDAPException
Asynchronously adds an entry to the directory, using the specified constraints.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.add(LDAPEntry, LDAPResponseQueue, LDAPConstraints)

bind

public void bind(int version,
                 java.lang.String dn,
                 byte[] passwd)
          throws LDAPException
Authenticates to the LDAP server (that the object is currently connected to) using the specified name, password, and LDAP version.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.bind(int, String, byte[])

bind

public void bind(int version,
                 java.lang.String dn,
                 byte[] passwd,
                 LDAPConstraints cons)
          throws LDAPException
Authenticates to the LDAP server (that the object is currently connected to) using the specified name, password, LDAP version, and constraints.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.bind(int, String, byte[], LDAPConstraints)

bind

public LDAPResponseQueue bind(int version,
                              java.lang.String dn,
                              byte[] passwd,
                              LDAPResponseQueue queue)
                       throws LDAPException
Asynchronously authenticates to the LDAP server (that the object is currently connected to) using the specified name, password, LDAP version, and queue.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.bind(int, String, byte[], LDAPResponseQueue)

bind

public LDAPResponseQueue bind(int version,
                              java.lang.String dn,
                              byte[] passwd,
                              LDAPResponseQueue queue,
                              LDAPConstraints cons)
                       throws LDAPException
Asynchronously authenticates to the LDAP server (that the object is currently connected to) using the specified name, password, LDAP version, queue, and constraints.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.bind(int, String, String, LDAPResponseQueue, LDAPConstraints)

bind

public void bind(java.lang.String dn,
                 java.lang.String authzid,
                 java.util.Map props,
                 java.lang.Object cbh)
          throws LDAPException
Authenticates to the LDAP server (that the object is currently connected to) using the specified name and the specified set of mechanisms.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.bind(String, String, Map, Object)

bind

public void bind(java.lang.String dn,
                 java.lang.String authzid,
                 java.util.Map props,
                 java.lang.Object cbh,
                 LDAPConstraints cons)
          throws LDAPException
Authenticates to the LDAP server (that the object is currently connected to) using the specified name and the specified set of mechanisms.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.bind(String, String, Map, Object, LDAPConstraints)

bind

public void bind(java.lang.String dn,
                 java.lang.String authzid,
                 java.lang.String[] mechanisms,
                 java.util.Map props,
                 java.lang.Object cbh)
          throws LDAPException
Authenticates to the LDAP server (that the object is currently connected to) using the specified name and the specified set of mechanisms.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.bind(String, String, String[], Map, Object)

bind

public void bind(java.lang.String dn,
                 java.lang.String authzid,
                 java.lang.String[] mechanisms,
                 java.util.Map props,
                 java.lang.Object cbh,
                 LDAPConstraints cons)
          throws LDAPException
Authenticates to the LDAP server (that the object is currently connected to) using the specified name and the specified set of mechanisms.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.bind(String, String, String[], Map, Object, LDAPConstraints)

compare

public boolean compare(java.lang.String dn,
                       LDAPAttribute attr)
                throws LDAPException
Synchronously checks to see if an entry contains an attribute with a specified value.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.compare(String, LDAPAttribute)

compare

public boolean compare(java.lang.String dn,
                       LDAPAttribute attr,
                       LDAPConstraints cons)
                throws LDAPException
Checks to see if an entry contains an attribute with a specified value, using the specified constraints.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.compare(String, LDAPAttribute, LDAPConstraints)

compare

public LDAPResponseQueue compare(java.lang.String dn,
                                 LDAPAttribute attr,
                                 LDAPResponseQueue queue)
                          throws LDAPException
Asynchronously compares an attribute value with one in the directory, using the specified queue.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.compare(String, LDAPAttribute, LDAPResponseQueue)

compare

public LDAPResponseQueue compare(java.lang.String dn,
                                 LDAPAttribute attr,
                                 LDAPResponseQueue queue,
                                 LDAPConstraints cons)
                          throws LDAPException
Asynchronously compares an attribute value with one in the directory, using the specified queue and contraints.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.compare(String, LDAPAttribute, LDAPResponseQueue, LDAPConstraints)

connect

public void connect(java.lang.String host,
                    int port)
             throws LDAPException
Connects to the specified host and port

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.connect(String, int)

delete

public void delete(java.lang.String dn)
            throws LDAPException
Synchronously deletes the entry with the specified distinguished name from the directory.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.delete(String)

delete

public void delete(java.lang.String dn,
                   LDAPConstraints cons)
            throws LDAPException
Synchronously deletes the entry with the specified distinguished name from the directory, using the specified constraints.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.delete(String, LDAPConstraints)

delete

public LDAPResponseQueue delete(java.lang.String dn,
                                LDAPResponseQueue queue)
                         throws LDAPException
Asynchronously deletes the entry with the specified distinguished name from the directory and returns the results to the specified queue.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.delete(String, LDAPResponseQueue)

delete

public LDAPResponseQueue delete(java.lang.String dn,
                                LDAPResponseQueue queue,
                                LDAPConstraints cons)
                         throws LDAPException
Asynchronously deletes the entry with the specified distinguished name from the directory, using the specified contraints and queue.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.delete(String, LDAPResponseQueue, LDAPConstraints)

disconnect

public void disconnect()
                throws LDAPException
Synchronously disconnects from the LDAP server.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.disconnect()

disconnect

public void disconnect(LDAPConstraints cons)
                throws LDAPException
Synchronously disconnects from the LDAP server, including constraints to send with the unbind request.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.disconnect(LDAPConstraints)

extendedOperation

public LDAPExtendedResponse extendedOperation(LDAPExtendedOperation op)
                                       throws LDAPException
Provides a synchronous means to access extended, non-mandatory operations offered by a particular LDAPv3 compliant server.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.extendedOperation( LDAPExtendedOperation)

extendedOperation

public LDAPExtendedResponse extendedOperation(LDAPExtendedOperation op,
                                              LDAPSearchConstraints cons)
                                       throws LDAPException
Provides a synchronous means to access extended, non-mandatory operations offered by a particular LDAPv3 compliant server.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.extendedOperation( LDAPExtendedOperation, LDAPSearchConstraints)

extendedOperation

public LDAPResponseQueue extendedOperation(LDAPExtendedOperation op,
                                           LDAPResponseQueue queue)
                                    throws LDAPException
Provides an asynchronous means to access extended, non-mandatory operations offered by a particular LDAPv3 compliant server.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.extendedOperation( LDAPExtendedOperation, LDAPResponseQueue)

extendedOperation

public LDAPResponseQueue extendedOperation(LDAPExtendedOperation op,
                                           LDAPSearchConstraints cons,
                                           LDAPResponseQueue queue)
                                    throws LDAPException
Provides an asynchronous means to access extended, non-mandatory operations offered by a particular LDAPv3 compliant server.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.extendedOperation( LDAPExtendedOperation, LDAPSearchConstraints, LDAPResponseQueue)

getResponseControls

public LDAPControl[] getResponseControls()
Returns the Server Controls associated with the most recent response to a synchronous request on this connection object.

See Also:
com.novell.ldap.LDAPConnection.getResponseControls()

modify

public void modify(java.lang.String dn,
                   LDAPModification mod)
            throws LDAPException
Synchronously makes a single change to an existing entry in the directory.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.modify(String, LDAPModification)

modify

public void modify(java.lang.String dn,
                   LDAPModification mod,
                   LDAPConstraints cons)
            throws LDAPException
Synchronously makes a single change to an existing entry in the directory, using the specified constraints.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.modify(String, LDAPModification, LDAPConstraints)

modify

public void modify(java.lang.String dn,
                   LDAPModification[] mods)
            throws LDAPException
Synchronously makes a set of changes to an existing entry in the directory.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.modify(String, LDAPModification[])

modify

public void modify(java.lang.String dn,
                   LDAPModification[] mods,
                   LDAPConstraints cons)
            throws LDAPException
Synchronously makes a set of changes to an existing entry in the directory, using the specified constraints.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.modify(String, LDAPModification[], LDAPConstraints)

modify

public LDAPResponseQueue modify(java.lang.String dn,
                                LDAPModification mod,
                                LDAPResponseQueue queue)
                         throws LDAPException
Asynchronously makes a single change to an existing entry in the directory.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.modify(String, LDAPModification, LDAPResponseQueue)

modify

public LDAPResponseQueue modify(java.lang.String dn,
                                LDAPModification mod,
                                LDAPResponseQueue queue,
                                LDAPConstraints cons)
                         throws LDAPException
Asynchronously makes a single change to an existing entry in the directory, using the specified constraints and queue.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.modify(String, LDAPModification, LDAPResponseQueue. LDAPConstraints)

modify

public LDAPResponseQueue modify(java.lang.String dn,
                                LDAPModification[] mods,
                                LDAPResponseQueue queue)
                         throws LDAPException
Asynchronously makes a set of changes to an existing entry in the directory.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.modify(String, LDAPModification[], LDAPResponseQueue)

modify

public LDAPResponseQueue modify(java.lang.String dn,
                                LDAPModification[] mods,
                                LDAPResponseQueue queue,
                                LDAPConstraints cons)
                         throws LDAPException
Asynchronously makes a set of changes to an existing entry in the directory, using the specified constraints and queue.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.modify(String, LDAPModification[], LDAPResponseQueue, LDAPConstraints)

read

public LDAPEntry read(java.lang.String dn)
               throws LDAPException
Synchronously reads the entry for the specified distiguished name (DN) and retrieves all attributes for the entry.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.read(String)

read

public LDAPEntry read(java.lang.String dn,
                      LDAPSearchConstraints cons)
               throws LDAPException
Synchronously reads the entry for the specified distiguished name (DN), using the specified constraints, and retrieves all attributes for the entry.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.read(String, LDAPSearchConstraints)

read

public LDAPEntry read(java.lang.String dn,
                      java.lang.String[] attrs)
               throws LDAPException
Synchronously reads the entry for the specified distinguished name (DN) and retrieves only the specified attributes from the entry.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.read(String, String[])

read

public LDAPEntry read(java.lang.String dn,
                      java.lang.String[] attrs,
                      LDAPSearchConstraints cons)
               throws LDAPException
Synchronously reads the entry for the specified distinguished name (DN), using the specified constraints, and retrieves only the specified attributes from the entry.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.read(String, String[], LDAPSearchConstraints)

read

public static LDAPEntry read(LDAPUrl toGet)
                      throws LDAPException
Synchronously reads the entry specified by the LDAP URL.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.read(LDAPUrl)

read

public static LDAPEntry read(LDAPUrl toGet,
                             LDAPSearchConstraints cons)
                      throws LDAPException
Synchronously reads the entry specified by the LDAP URL, using the specified constraints.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.read(LDAPUrl, LDAPSearchConstraints)

rename

public void rename(java.lang.String dn,
                   java.lang.String newRdn,
                   boolean deleteOldRdn)
            throws LDAPException
Synchronously renames an existing entry in the directory.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.rename(String, String, boolean)

rename

public void rename(java.lang.String dn,
                   java.lang.String newRdn,
                   boolean deleteOldRdn,
                   LDAPConstraints cons)
            throws LDAPException
Synchronously renames an existing entry in the directory, using the specified constraints.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.rename(String, String, boolean, LDAPConstraints)

rename

public void rename(java.lang.String dn,
                   java.lang.String newRdn,
                   java.lang.String newParentdn,
                   boolean deleteOldRdn)
            throws LDAPException
Synchronously renames an existing entry in the directory, possibly repositioning the entry in the directory tree.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.rename(String, String, String, boolean)

rename

public void rename(java.lang.String dn,
                   java.lang.String newRdn,
                   java.lang.String newParentdn,
                   boolean deleteOldRdn,
                   LDAPConstraints cons)
            throws LDAPException
Synchronously renames an existing entry in the directory, using the specified constraints and possibly repositioning the entry in the directory tree.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.rename(String, String, String, boolean, LDAPConstraints)

rename

public LDAPResponseQueue rename(java.lang.String dn,
                                java.lang.String newRdn,
                                boolean deleteOldRdn,
                                LDAPResponseQueue queue)
                         throws LDAPException
Asynchronously renames an existing entry in the directory.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.rename(String, String, boolean, LDAPResponseQueue)

rename

public LDAPResponseQueue rename(java.lang.String dn,
                                java.lang.String newRdn,
                                boolean deleteOldRdn,
                                LDAPResponseQueue queue,
                                LDAPConstraints cons)
                         throws LDAPException
Asynchronously renames an existing entry in the directory, using the specified constraints.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.rename(String, String, boolean, LDAPResponseQueue, LDAPConstraints)

rename

public LDAPResponseQueue rename(java.lang.String dn,
                                java.lang.String newRdn,
                                java.lang.String newParentdn,
                                boolean deleteOldRdn,
                                LDAPResponseQueue queue)
                         throws LDAPException
Asynchronously renames an existing entry in the directory, possibly repositioning the entry in the directory.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.rename(String, String, String, boolean, LDAPResponseQueue)

rename

public LDAPResponseQueue rename(java.lang.String dn,
                                java.lang.String newRdn,
                                java.lang.String newParentdn,
                                boolean deleteOldRdn,
                                LDAPResponseQueue queue,
                                LDAPConstraints cons)
                         throws LDAPException
Asynchronously renames an existing entry in the directory, using the specified constraints and possibily repositioning the entry in the directory.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.rename(String, String, String, boolean, LDAPResponseQueue, LDAPConstraints)

search

public LDAPSearchResults search(java.lang.String base,
                                int scope,
                                java.lang.String filter,
                                java.lang.String[] attrs,
                                boolean typesOnly)
                         throws LDAPException
Synchronously performs the search specified by the parameters.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.search(String, int, String, String[], boolean)

search

public LDAPSearchResults search(java.lang.String base,
                                int scope,
                                java.lang.String filter,
                                java.lang.String[] attrs,
                                boolean typesOnly,
                                LDAPSearchConstraints cons)
                         throws LDAPException
Synchronously performs the search specified by the parameters, using the specified search constraints.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.search(String, int, String, String[], boolean, LDAPSearchConstraints)

search

public LDAPSearchQueue search(java.lang.String base,
                              int scope,
                              java.lang.String filter,
                              java.lang.String[] attrs,
                              boolean typesOnly,
                              LDAPSearchQueue queue)
                       throws LDAPException
Asynchronously performs the search specified by the parameters.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.search(String, int, String, String[], boolean, LDAPSearchQueue)

search

public LDAPSearchQueue search(java.lang.String base,
                              int scope,
                              java.lang.String filter,
                              java.lang.String[] attrs,
                              boolean typesOnly,
                              LDAPSearchQueue queue,
                              LDAPSearchConstraints cons)
                       throws LDAPException
Asynchronously performs the search specified by the parameters, also allowing specification of constraints for the search.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.search(String, int, String, String[], boolean, LDAPSearchQueue, LDAPSearchConstraints)

search

public static LDAPSearchResults search(LDAPUrl toGet)
                                throws LDAPException
Synchronously performs the search specified by the LDAP URL, returning an enumerable LDAPSearchResults object.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.search(LDAPUrl)

search

public static LDAPSearchResults search(LDAPUrl toGet,
                                       LDAPSearchConstraints cons)
                                throws LDAPException
Synchronously perfoms the search specified by the LDAP URL, using the specified search constraints.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.search(LDAPUrl, LDAPSearchConstraints)

fetchSchema

public LDAPSchema fetchSchema(java.lang.String schemaDN)
                       throws LDAPException
Retrieves the schema associated with a particular schema DN in the Directory server.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.fetchSchema(String)

getSchemaDN

public java.lang.String getSchemaDN()
                             throws LDAPException
Retrieves the DN for the schema at the root DSE of the Directory Server.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.getSchemaDN()

getSchemaDN

public java.lang.String getSchemaDN(java.lang.String entryDN)
                             throws LDAPException
Retrieves the DN of the schema associated with a particular entry in the directory.

Throws:
LDAPException
See Also:
com.novell.ldap.LDAPConnection.getSchemaDN(String)

All LDAP Classes
Internal LDAP Classes

Copyright ? 2002 Novell, Inc. All Rights Reserved.
Novell, Inc.
1800 South Novell Place
Provo, Ut 84606
Phone: (801) 861-5000