Class LDAPCertStoreParameters

java.lang.Object
java.security.cert.LDAPCertStoreParameters
All Implemented Interfaces:
Cloneable, CertStoreParameters

public class LDAPCertStoreParameters extends Object implements CertStoreParameters
Parameters used as input for the LDAP CertStore algorithm.

This class is used to provide necessary configuration parameters (server name and port number) to implementations of the LDAP CertStore algorithm. However, if you are retrieving certificates or CRLs from an ldap URI as specified by RFC 5280, use the URICertStoreParameters instead, as the URI may contain additional information such as the distinguished name that will help the LDAP CertStore find the specific certificates and CRLs.

Concurrent Access

Unless otherwise specified, the methods defined in this class are not thread-safe. Multiple threads that need to access a single object concurrently should synchronize amongst themselves and provide the necessary locking. Multiple threads each manipulating separate objects need not synchronize.

Since:
1.4
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of LDAPCertStoreParameters with the default parameter values (server name "localhost", port 389).
    Creates an instance of LDAPCertStoreParameters with the specified server name and a default port of 389.
    LDAPCertStoreParameters(String serverName, int port)
    Creates an instance of LDAPCertStoreParameters with the specified parameter values.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a copy of this object.
    int
    Returns the port number of the LDAP server.
    Returns the DNS name of the LDAP server.
    Returns a formatted string describing the parameters.

    Methods declared in class Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    Modifier and Type
    Method
    Description
    boolean
    Compares the argument to the receiver, and answers true if they represent the same object using a class specific comparison.
    protected void
    Deprecated, for removal: This API element is subject to removal in a future version.
    May cause performance issues, deadlocks and hangs.
    final Class<? extends Object>
    Answers the unique instance of java.lang.Class which represents the class of the receiver.
    int
    Answers an integer hash code for the receiver.
    final void
    Causes one thread which is waiting on the receiver to be made ready to run.
    final void
    Causes all threads which are waiting on the receiver to be made ready to run.
    final void
    Causes the thread which sent this message to be made not ready to run pending some change in the receiver (as indicated by notify or notifyAll).
    final void
    wait(long time)
    Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated by notify or notifyAll) or the expiration of the timeout.
    final void
    wait(long time, int frac)
    Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated by notify or notifyAll) or the expiration of the timeout.
  • Constructor Details

    • LDAPCertStoreParameters

      public LDAPCertStoreParameters(String serverName, int port)
      Creates an instance of LDAPCertStoreParameters with the specified parameter values.
      Parameters:
      serverName - the DNS name of the LDAP server
      port - the port number of the LDAP server
      Throws:
      NullPointerException - if serverName is null
    • LDAPCertStoreParameters

      public LDAPCertStoreParameters(String serverName)
      Creates an instance of LDAPCertStoreParameters with the specified server name and a default port of 389.
      Parameters:
      serverName - the DNS name of the LDAP server
      Throws:
      NullPointerException - if serverName is null
    • LDAPCertStoreParameters

      public LDAPCertStoreParameters()
      Creates an instance of LDAPCertStoreParameters with the default parameter values (server name "localhost", port 389).
  • Method Details

    • getServerName

      public String getServerName()
      Returns the DNS name of the LDAP server.
      Returns:
      the name (not null)
    • getPort

      public int getPort()
      Returns the port number of the LDAP server.
      Returns:
      the port number
    • clone

      public Object clone()
      Returns a copy of this object. Changes to the copy will not affect the original and vice versa.

      Note: this method currently performs a shallow copy of the object (simply calls Object.clone()). This may be changed in a future revision to perform a deep copy if new parameters are added that should not be shared.

      Specified by:
      clone in interface CertStoreParameters
      Overrides:
      clone in class Object
      Returns:
      the copy
    • toString

      public String toString()
      Returns a formatted string describing the parameters.
      Overrides:
      toString in class Object
      Returns:
      a formatted string describing the parameters