FileDocCategorySizeDatePackage
LDAPCertStoreParameters.javaAPI DocAndroid 1.5 API4136Wed May 06 22:41:06 BST 2009java.security.cert

LDAPCertStoreParameters

public class LDAPCertStoreParameters extends Object implements CertStoreParameters
The parameters to initialize a LDAP {@code CertStore} instance.
since
Android 1.0

Fields Summary
private static final String
DEFAULT_LDAP_SERVER_NAME
private static final int
DEFAULT_LDAP_PORT
private final String
serverName
private final int
port
Constructors Summary
public LDAPCertStoreParameters(String serverName, int port)
Creates a new {@code LDAPCertStoreParameters} instance with the specified server name and port.

param
serverName the LDAP server name.
param
port the port.
throws
NullPointerException is {@code serverName} is {@code null}.
since
Android 1.0


                                                                              
         
        this.port = port;
        this.serverName = serverName;
        if (this.serverName == null) {
            throw new NullPointerException();
        }
    
public LDAPCertStoreParameters()
Creates a new {@code LDAPCertStoreParameters} instance with default parameters.

The default parameters are server name "localhost" and port 389.

since
Android 1.0

        this.serverName = DEFAULT_LDAP_SERVER_NAME;
        this.port = DEFAULT_LDAP_PORT;
    
public LDAPCertStoreParameters(String serverName)
Creates a new {@code LDAPCertStoreParameters} instance with the specified server name and default port 389.

param
serverName the LDAP server name.
throws
NullPointerException if {@code serverName} is {@code null}.
since
Android 1.0

        this.port = DEFAULT_LDAP_PORT;
        this.serverName = serverName;
        if (this.serverName == null) {
            throw new NullPointerException();
        }
    
Methods Summary
public java.lang.Objectclone()
Clones this {@code LDAPCertStoreParameters} instance.

return
the cloned instance.
since
Android 1.0

        return new LDAPCertStoreParameters(serverName, port);
    
public intgetPort()
Returns the LDAP server port.

return
the LDAP server port.
since
Android 1.0

        return port;
    
public java.lang.StringgetServerName()
Returns the LDAP server name.

return
the LDAP server name.
since
Android 1.0

        return serverName;
    
public java.lang.StringtoString()
Returns the string representation of this {@code LDAPCertStoreParameters} instance.

return
the string representation of this {@code LDAPCertStoreParameters} instance.
since
Android 1.0

        StringBuffer sb =
            new StringBuffer("LDAPCertStoreParameters: [\n serverName: "); //$NON-NLS-1$
        sb.append(getServerName());
        sb.append("\n port: "); //$NON-NLS-1$
        sb.append(getPort());
        sb.append("\n]"); //$NON-NLS-1$
        return sb.toString();