|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.ldap.clients.embedded.LdapClientImpl
public class LdapClientImpl
Interface into the LDAPd session
| Field Summary | |
|---|---|
static java.lang.String |
DEFAULT_HOST
The default host to use if it is not specified on command lin |
static int |
DEFAULT_PORT
The default port to use if none are specified on command line |
| Constructor Summary | |
|---|---|
LdapClientImpl()
|
|
| Method Summary | |
|---|---|
void |
closeServerConnection()
Close the socket connection to the server. |
void |
connectToServer()
Connects the socket to the server. |
java.lang.String |
getBindDn()
DN used to bind to the server |
java.lang.String |
getHost()
Get the hostname if of the LDAP server |
java.lang.String |
getPassword()
Password of the DN entry used to bind to the server |
int |
getPort()
Port used to connect to the LDAP server |
boolean |
isConnectedToServer()
Determines if there is a current connection to the server |
boolean |
isDryRun()
Determine if this is a dry run, no message sent to the server |
boolean |
isVerbose()
Determine if verbose has been turned on |
boolean |
isVersion3()
Determine if the LDIF format version 3 compliant |
LdapClientResponse |
ldapAdd(java.lang.StringBuffer a_entry)
|
LdapClientResponse |
ldapBind()
Perform an LDAP bind to the server |
LdapClientResponse |
ldapDelete(java.lang.String a_deleteDn)
Perform an LDAP delete on the DN passed in |
LdapClientResponse |
ldapModify(java.lang.StringBuffer a_entry)
|
LdapClientResponse |
ldapSearch(LdapSearchParameters a_parms)
Perform an LDAP search operation on the search filer passed in. |
void |
ldapUnbind()
Perform an LDAP unbind to the server |
void |
printAttributeList(javax.naming.NamingEnumeration a_attributeList)
Print each attribute and the values for each attribute from the list passed into the method. |
void |
printAttributeNames(javax.naming.NamingEnumeration a_attributeList)
Print each attribute name only. |
void |
printLdapBindResponse(BindResponse a_response)
|
void |
setBindDn(java.lang.String a_bindDn)
Set the DN of the user to bind to server with |
void |
setHost(java.lang.String a_host)
Set the hostname of the LDAP Server |
void |
setIsDryRun(boolean a_isDryRun)
Set the value of the dry run mode |
void |
setIsVerbose(boolean a_isVerbose)
Set verbose mode |
void |
setIsVersion3(boolean a_isVersion3)
Set value of version3 compatibility |
void |
setPassword(java.lang.String a_password)
Password for the DN entry being used to bind |
void |
setPort(int a_port)
Set the port number to connect to server with |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DEFAULT_PORT
public static final java.lang.String DEFAULT_HOST
| Constructor Detail |
|---|
public LdapClientImpl()
| Method Detail |
|---|
public void setHost(java.lang.String a_host)
setHost in interface LdapClienta_host - Hostname of the LDAP Serverpublic void setPort(int a_port)
setPort in interface LdapClienta_port - Port number to use to connect to the serverpublic void setBindDn(java.lang.String a_bindDn)
setBindDn in interface LdapClienta_bindDn - DN of the user to bind to server withpublic void setPassword(java.lang.String a_password)
setPassword in interface LdapClienta_password - Password for the DN entry being used to bindpublic void setIsVersion3(boolean a_isVersion3)
setIsVersion3 in interface LdapClienta_isVersion3 - True if LDIF is version3public void setIsVerbose(boolean a_isVerbose)
setIsVerbose in interface LdapClienta_isVerbose - True if verbose mode is turned onpublic void setIsDryRun(boolean a_isDryRun)
setIsDryRun in interface LdapClienta_isDryRun - True if the dry run mode is turned onpublic java.lang.String getHost()
getHost in interface LdapClientpublic int getPort()
getPort in interface LdapClientpublic java.lang.String getBindDn()
getBindDn in interface LdapClientpublic java.lang.String getPassword()
getPassword in interface LdapClientpublic boolean isVersion3()
isVersion3 in interface LdapClientpublic boolean isVerbose()
isVerbose in interface LdapClientpublic boolean isDryRun()
isDryRun in interface LdapClient
public void connectToServer()
throws java.net.UnknownHostException,
java.io.IOException
LdapClient
connectToServer in interface LdapClientjava.net.UnknownHostException - Cannot find the host
java.io.IOException - Error establishing the socket connectionpublic boolean isConnectedToServer()
LdapClient
isConnectedToServer in interface LdapClient
public void closeServerConnection()
throws java.io.IOException
LdapClient
closeServerConnection in interface LdapClientjava.io.IOException - Error terminating the socket connection
public LdapClientResponse ldapBind()
throws java.io.IOException
LdapClient
ldapBind in interface LdapClientjava.io.IOException - Error with the IO communication to the server
public void printLdapBindResponse(BindResponse a_response)
throws java.io.IOException
java.io.IOException
public void ldapUnbind()
throws java.io.IOException
LdapClient
ldapUnbind in interface LdapClientjava.io.IOException - Error with the IO communication to the server
public LdapClientResponse ldapDelete(java.lang.String a_deleteDn)
throws java.io.IOException
LdapClient
ldapDelete in interface LdapClienta_deleteDn - DN of the entry to delete
java.io.IOException - Error with the IO communication to the server
public LdapClientResponse ldapAdd(java.lang.StringBuffer a_entry)
throws java.io.IOException
ldapAdd in interface LdapClientjava.io.IOException - Error with the IO communication to the server
public LdapClientResponse ldapModify(java.lang.StringBuffer a_entry)
throws java.io.IOException
ldapModify in interface LdapClientjava.io.IOException - Error with the IO communication to the server
public LdapClientResponse ldapSearch(LdapSearchParameters a_parms)
throws java.io.IOException
LdapClient
ldapSearch in interface LdapClientjava.io.IOException - Error with the IO communication to the serverpublic void printAttributeNames(javax.naming.NamingEnumeration a_attributeList)
printAttributeNames in interface LdapClienta_attributeList - NamingEnumeration of Attributespublic void printAttributeList(javax.naming.NamingEnumeration a_attributeList)
printAttributeList in interface LdapClienta_attributeList - NamingEnumeration of Attributes
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||