|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opends.server.tools.LDAPConnection
public class LDAPConnection
This class provides a tool that can be used to issue search requests to the Directory Server.
Constructor Summary | |
---|---|
LDAPConnection(java.lang.String host,
int port,
LDAPConnectionOptions options)
Constructor for the LDAPConnection object. |
|
LDAPConnection(java.lang.String host,
int port,
LDAPConnectionOptions options,
java.io.PrintStream out,
java.io.PrintStream err)
Constructor for the LDAPConnection object. |
Method Summary | |
---|---|
void |
close(java.util.concurrent.atomic.AtomicInteger nextMessageID)
Close the underlying ASN1 reader and writer, optionally sending an unbind request before disconnecting. |
void |
connectToHost(java.lang.String bindDN,
java.lang.String bindPassword)
Connects to the directory server instance running on specified hostname and port number. |
void |
connectToHost(java.lang.String bindDN,
java.lang.String bindPassword,
java.util.concurrent.atomic.AtomicInteger nextMessageID)
Connects to the directory server instance running on specified hostname and port number. |
LDAPReader |
getLDAPReader()
Get the underlying LDAP reader. |
LDAPWriter |
getLDAPWriter()
Get the underlying LDAP writer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LDAPConnection(java.lang.String host, int port, LDAPConnectionOptions options)
host
- The hostname to send the request to.port
- The port number on which the directory server is accepting
requests.options
- The set of options for this connection.public LDAPConnection(java.lang.String host, int port, LDAPConnectionOptions options, java.io.PrintStream out, java.io.PrintStream err)
host
- The hostname to send the request to.port
- The port number on which the directory server is accepting
requests.options
- The set of options for this connection.out
- The print stream to use for standard output.err
- The print stream to use for standard error.Method Detail |
---|
public void connectToHost(java.lang.String bindDN, java.lang.String bindPassword) throws LDAPConnectionException
bindDN
- The DN to bind with.bindPassword
- The password to bind with.
LDAPConnectionException
- If a problem occurs while attempting to
establish the connection to the server.public void connectToHost(java.lang.String bindDN, java.lang.String bindPassword, java.util.concurrent.atomic.AtomicInteger nextMessageID) throws LDAPConnectionException
bindDN
- The DN to bind with.bindPassword
- The password to bind with.nextMessageID
- The message ID counter that should be used for
operations performed while establishing the
connection.
LDAPConnectionException
- If a problem occurs while attempting to
establish the connection to the server.public void close(java.util.concurrent.atomic.AtomicInteger nextMessageID)
nextMessageID
- The message ID counter that should be used for
the unbind request, or null
if the
connection should be closed without an unbind
request.public LDAPWriter getLDAPWriter()
public LDAPReader getLDAPReader()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |