Module org.elasticsearch.sslconfig
Package org.elasticsearch.common.ssl
Record Class StoredCertificate
java.lang.Object
java.lang.Record
org.elasticsearch.common.ssl.StoredCertificate
public record StoredCertificate(X509Certificate certificate, String path, String format, String alias, boolean hasPrivateKey)
extends Record
Information about a certificate that is locally stored.It includes a reference to the
X509Certificate itself,
as well as information about where it was loaded from.-
Constructor Summary
ConstructorsConstructorDescriptionStoredCertificate(X509Certificate certificate, String path, String format, String alias, boolean hasPrivateKey) Creates an instance of aStoredCertificaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionalias()Returns the value of thealiasrecord component.Returns the value of thecertificaterecord component.final booleanIndicates whether some other object is "equal to" this one.format()Returns the value of theformatrecord component.final inthashCode()Returns a hash code value for this object.booleanReturns the value of thehasPrivateKeyrecord component.path()Returns the value of thepathrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
StoredCertificate
public StoredCertificate(X509Certificate certificate, @Nullable String path, String format, @Nullable String alias, boolean hasPrivateKey) Creates an instance of aStoredCertificaterecord class.- Parameters:
certificate- the value for thecertificaterecord componentpath- the value for thepathrecord componentformat- the value for theformatrecord componentalias- the value for thealiasrecord componenthasPrivateKey- the value for thehasPrivateKeyrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
certificate
Returns the value of thecertificaterecord component.- Returns:
- the value of the
certificaterecord component
-
path
Returns the value of thepathrecord component.- Returns:
- the value of the
pathrecord component
-
format
Returns the value of theformatrecord component.- Returns:
- the value of the
formatrecord component
-
alias
Returns the value of thealiasrecord component.- Returns:
- the value of the
aliasrecord component
-
hasPrivateKey
public boolean hasPrivateKey()Returns the value of thehasPrivateKeyrecord component.- Returns:
- the value of the
hasPrivateKeyrecord component
-