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:
CertStore
Constructors
Constructor | Description |
---|---|
LDAPCertStoreParameters() | Creates an instance of |
LDAPCertStoreParameters(String serverName) | Creates an instance of |
LDAPCertStoreParameters(String serverName,
int port) | Creates an instance of |
Methods
Modifier and Type | Method | Description |
---|---|---|
Object | clone() | Returns a copy of this object. |
int | getPort() | Returns the port number of the LDAP server. |
String | getServerName() | Returns the DNS name of the LDAP server. |
String | toString() | Returns a formatted string describing the parameters. |
Methods declared in class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Constructors
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
- ifserverName
isnull
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
- ifserverName
isnull
LDAPCertStoreParameters
public LDAPCertStoreParameters()
Creates an instance of LDAPCertStoreParameters
with the default parameter values (server name "localhost", port 389).
Methods
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 interfaceCertStoreParameters
- Overrides:
-
clone
in classObject
- Returns:
- the copy
- See Also:
Cloneable
toString
public String toString()
Returns a formatted string describing the parameters.
© 1993, 2020, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/security/cert/LDAPCertStoreParameters.html