Stay organized with collections
Save and categorize content based on your preferences.
LDAPCertStoreParameters
open class LDAPCertStoreParameters : 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.
Summary
Public constructors |
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.
|
Creates an instance of LDAPCertStoreParameters with the specified parameter values.
|
Public methods |
open Any |
Returns a copy of this object.
|
open Int |
Returns the port number of the LDAP server.
|
open String! |
Returns the DNS name of the LDAP server.
|
open String |
Returns a formatted string describing the parameters.
|
Public constructors
LDAPCertStoreParameters
LDAPCertStoreParameters()
Creates an instance of LDAPCertStoreParameters
with the default parameter values (server name "localhost", port 389).
LDAPCertStoreParameters
LDAPCertStoreParameters(serverName: String!)
Creates an instance of LDAPCertStoreParameters
with the specified server name and a default port of 389.
Parameters |
serverName |
String!: the DNS name of the LDAP server |
Exceptions |
java.lang.NullPointerException |
if serverName is null |
LDAPCertStoreParameters
LDAPCertStoreParameters(
serverName: String!,
port: Int)
Creates an instance of LDAPCertStoreParameters
with the specified parameter values.
Parameters |
serverName |
String!: the DNS name of the LDAP server |
port |
Int: the port number of the LDAP server |
Exceptions |
java.lang.NullPointerException |
if serverName is null |
Public methods
clone
open fun clone(): Any
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.
Exceptions |
java.lang.CloneNotSupportedException |
if the object's class does not support the Cloneable interface. Subclasses that override the clone method can also throw this exception to indicate that an instance cannot be cloned. |
getPort
open fun getPort(): Int
Returns the port number of the LDAP server.
Return |
Int |
the port number |
getServerName
open fun getServerName(): String!
Returns the DNS name of the LDAP server.
Return |
String! |
the name (not null ) |
toString
open fun toString(): String
Returns a formatted string describing the parameters.
Return |
String |
a formatted string describing the parameters |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# LDAPCertStoreParameters\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nLDAPCertStoreParameters\n=======================\n\n```\nopen class LDAPCertStoreParameters : CertStoreParameters\n```\n\n|---|-------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [java.security.cert.LDAPCertStoreParameters](#) |\n\nParameters used as input for the LDAP `CertStore` algorithm.\n\nThis 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](/reference/kotlin/java/security/cert/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.\n\n**Concurrent Access**\n\nUnless 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.\n\nSummary\n-------\n\n| Public constructors ||\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [LDAPCertStoreParameters](#LDAPCertStoreParameters())`()` Creates an instance of `LDAPCertStoreParameters` with the default parameter values (server name \"localhost\", port 389). |\n| [LDAPCertStoreParameters](#LDAPCertStoreParameters(kotlin.String))`(`serverName:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`)` Creates an instance of `LDAPCertStoreParameters` with the specified server name and a default port of 389. |\n| [LDAPCertStoreParameters](#LDAPCertStoreParameters(kotlin.String,%20kotlin.Int))`(`serverName:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`, `port:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Creates an instance of `LDAPCertStoreParameters` with the specified parameter values. |\n\n| Public methods ||\n|----------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------|\n| open [Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) | [clone](#clone())`()` Returns a copy of this object. |\n| open [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [getPort](#getPort())`()` Returns the port number of the LDAP server. |\n| open [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)! | [getServerName](#getServerName())`()` Returns the DNS name of the LDAP server. |\n| open [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [toString](#toString())`()` Returns a formatted string describing the parameters. |\n\nPublic constructors\n-------------------\n\n### LDAPCertStoreParameters\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nLDAPCertStoreParameters()\n```\n\nCreates an instance of `LDAPCertStoreParameters` with the default parameter values (server name \"localhost\", port 389). \n\n### LDAPCertStoreParameters\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nLDAPCertStoreParameters(serverName: String!)\n```\n\nCreates an instance of `LDAPCertStoreParameters` with the specified server name and a default port of 389.\n\n| Parameters ||\n|--------------|--------------------------------------------------------------------------------------------------------------------|\n| `serverName` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!: the DNS name of the LDAP server |\n\n| Exceptions ||\n|----------------------------------|---------------------------|\n| `java.lang.NullPointerException` | if `serverName` is `null` |\n\n### LDAPCertStoreParameters\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nLDAPCertStoreParameters(\n serverName: String!, \n port: Int)\n```\n\nCreates an instance of `LDAPCertStoreParameters` with the specified parameter values.\n\n| Parameters ||\n|--------------|--------------------------------------------------------------------------------------------------------------------|\n| `serverName` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!: the DNS name of the LDAP server |\n| `port` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): the port number of the LDAP server |\n\n| Exceptions ||\n|----------------------------------|---------------------------|\n| `java.lang.NullPointerException` | if `serverName` is `null` |\n\nPublic methods\n--------------\n\n### clone\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun clone(): Any\n```\n\nReturns a copy of this object. Changes to the copy will not affect the original and vice versa.\n\nNote: 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.\n\n| Return ||\n|----------------------------------------------------------------------------|----------|\n| [Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) | the copy |\n\n| Exceptions ||\n|----------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `java.lang.CloneNotSupportedException` | if the object's class does not support the `Cloneable` interface. Subclasses that override the `clone` method can also throw this exception to indicate that an instance cannot be cloned. |\n\n### getPort\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun getPort(): Int\n```\n\nReturns the port number of the LDAP server.\n\n| Return ||\n|----------------------------------------------------------------------------|-----------------|\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | the port number |\n\n### getServerName\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun getServerName(): String!\n```\n\nReturns the DNS name of the LDAP server.\n\n| Return ||\n|-----------------------------------------------------------------------------------|-----------------------|\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)! | the name (not `null`) |\n\n### toString\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun toString(): String\n```\n\nReturns a formatted string describing the parameters.\n\n| Return ||\n|----------------------------------------------------------------------------------|----------------------------------------------|\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | a formatted string describing the parameters |"]]