summaryrefslogtreecommitdiffstats
path: root/pki/base/common/src/com/netscape/cmscore/ldapconn/LdapAnonConnection.java
diff options
context:
space:
mode:
Diffstat (limited to 'pki/base/common/src/com/netscape/cmscore/ldapconn/LdapAnonConnection.java')
-rw-r--r--pki/base/common/src/com/netscape/cmscore/ldapconn/LdapAnonConnection.java36
1 files changed, 15 insertions, 21 deletions
diff --git a/pki/base/common/src/com/netscape/cmscore/ldapconn/LdapAnonConnection.java b/pki/base/common/src/com/netscape/cmscore/ldapconn/LdapAnonConnection.java
index 1d3996dd..09c77048 100644
--- a/pki/base/common/src/com/netscape/cmscore/ldapconn/LdapAnonConnection.java
+++ b/pki/base/common/src/com/netscape/cmscore/ldapconn/LdapAnonConnection.java
@@ -17,18 +17,16 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.cmscore.ldapconn;
-
import netscape.ldap.LDAPConnection;
import netscape.ldap.LDAPException;
import netscape.ldap.LDAPSocketFactory;
import netscape.ldap.LDAPv2;
-
/**
- * A LDAP connection that is bound to a server host, port and secure type.
- * Makes a LDAP connection when instantiated.
- * Cannot establish another LDAP connection after construction.
- * LDAPConnection connect methods are overridden to prevent this.
+ * A LDAP connection that is bound to a server host, port and secure type. Makes
+ * a LDAP connection when instantiated. Cannot establish another LDAP connection
+ * after construction. LDAPConnection connect methods are overridden to prevent
+ * this.
*/
public class LdapAnonConnection extends LDAPConnection {
@@ -40,26 +38,24 @@ public class LdapAnonConnection extends LDAPConnection {
/**
* instantiates a connection to a ldap server
*/
- public LdapAnonConnection(LdapConnInfo connInfo)
- throws LDAPException {
+ public LdapAnonConnection(LdapConnInfo connInfo) throws LDAPException {
super(connInfo.getSecure() ? new LdapJssSSLSocketFactory() : null);
- // Set option to automatically follow referrals.
+ // Set option to automatically follow referrals.
// rebind info is also anonymous.
boolean followReferrals = connInfo.getFollowReferrals();
setOption(LDAPv2.REFERRALS, new Boolean(followReferrals));
- super.connect(connInfo.getVersion(),
- connInfo.getHost(), connInfo.getPort(), null, null);
+ super.connect(connInfo.getVersion(), connInfo.getHost(),
+ connInfo.getPort(), null, null);
}
/**
* instantiates a connection to a ldap server
*/
- public LdapAnonConnection(String host, int port, int version,
- LDAPSocketFactory fac)
- throws LDAPException {
+ public LdapAnonConnection(String host, int port, int version,
+ LDAPSocketFactory fac) throws LDAPException {
super(fac);
super.connect(version, host, port, null, null);
}
@@ -68,14 +64,13 @@ public class LdapAnonConnection extends LDAPConnection {
* instantiates a non-secure connection to a ldap server
*/
public LdapAnonConnection(String host, int port, int version)
- throws LDAPException {
+ throws LDAPException {
super();
super.connect(version, host, port, null, null);
}
/**
- * overrides superclass connect.
- * does not allow reconnect.
+ * overrides superclass connect. does not allow reconnect.
*/
public void connect(String host, int port) throws LDAPException {
throw new RuntimeException(
@@ -83,11 +78,10 @@ public class LdapAnonConnection extends LDAPConnection {
}
/**
- * overrides superclass connect.
- * does not allow reconnect.
+ * overrides superclass connect. does not allow reconnect.
*/
- public void connect(int version, String host, int port,
- String dn, String pw) throws LDAPException {
+ public void connect(int version, String host, int port, String dn, String pw)
+ throws LDAPException {
throw new RuntimeException(
"this LdapAnonConnection already connected: connect(v,h,p)");
}