Package io.netty.handler.ssl
Class DefaultOpenSslKeyMaterial
- java.lang.Object
-
- io.netty.util.AbstractReferenceCounted
-
- io.netty.handler.ssl.DefaultOpenSslKeyMaterial
-
- All Implemented Interfaces:
OpenSslKeyMaterial,ReferenceCounted
final class DefaultOpenSslKeyMaterial extends AbstractReferenceCounted implements OpenSslKeyMaterial
-
-
Field Summary
Fields Modifier and Type Field Description private longchainprivate ResourceLeakTracker<DefaultOpenSslKeyMaterial>leakprivate static ResourceLeakDetector<DefaultOpenSslKeyMaterial>leakDetectorprivate longprivateKeyprivate java.security.cert.X509Certificate[]x509CertificateChain
-
Constructor Summary
Constructors Constructor Description DefaultOpenSslKeyMaterial(long chain, long privateKey, java.security.cert.X509Certificate[] x509CertificateChain)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.security.cert.X509Certificate[]certificateChain()Returns the configuredX509Certificates.longcertificateChainAddress()Returns the pointer to theSTACK_OF(X509)which holds the certificate chain.protected voiddeallocate()Called onceAbstractReferenceCounted.refCnt()is equals 0.longprivateKeyAddress()Returns the pointer to theEVP_PKEY.booleanrelease()Decreases the reference count by1and deallocates this object if the reference count reaches at0.booleanrelease(int decrement)Decreases the reference count by the specifieddecrementand deallocates this object if the reference count reaches at0.DefaultOpenSslKeyMaterialretain()Increases the reference count by1.DefaultOpenSslKeyMaterialretain(int increment)Increases the reference count by the specifiedincrement.DefaultOpenSslKeyMaterialtouch()Records the current access location of this object for debugging purposes.DefaultOpenSslKeyMaterialtouch(java.lang.Object hint)Records the current access location of this object with an additional arbitrary information for debugging purposes.-
Methods inherited from class io.netty.util.AbstractReferenceCounted
refCnt, setRefCnt
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.netty.util.ReferenceCounted
refCnt
-
-
-
-
Field Detail
-
leakDetector
private static final ResourceLeakDetector<DefaultOpenSslKeyMaterial> leakDetector
-
leak
private final ResourceLeakTracker<DefaultOpenSslKeyMaterial> leak
-
x509CertificateChain
private final java.security.cert.X509Certificate[] x509CertificateChain
-
chain
private long chain
-
privateKey
private long privateKey
-
-
Method Detail
-
certificateChain
public java.security.cert.X509Certificate[] certificateChain()
Description copied from interface:OpenSslKeyMaterialReturns the configuredX509Certificates.- Specified by:
certificateChainin interfaceOpenSslKeyMaterial
-
certificateChainAddress
public long certificateChainAddress()
Description copied from interface:OpenSslKeyMaterialReturns the pointer to theSTACK_OF(X509)which holds the certificate chain.- Specified by:
certificateChainAddressin interfaceOpenSslKeyMaterial
-
privateKeyAddress
public long privateKeyAddress()
Description copied from interface:OpenSslKeyMaterialReturns the pointer to theEVP_PKEY.- Specified by:
privateKeyAddressin interfaceOpenSslKeyMaterial
-
deallocate
protected void deallocate()
Description copied from class:AbstractReferenceCountedCalled onceAbstractReferenceCounted.refCnt()is equals 0.- Specified by:
deallocatein classAbstractReferenceCounted
-
retain
public DefaultOpenSslKeyMaterial retain()
Description copied from interface:ReferenceCountedIncreases the reference count by1.- Specified by:
retainin interfaceOpenSslKeyMaterial- Specified by:
retainin interfaceReferenceCounted- Overrides:
retainin classAbstractReferenceCounted
-
retain
public DefaultOpenSslKeyMaterial retain(int increment)
Description copied from interface:ReferenceCountedIncreases the reference count by the specifiedincrement.- Specified by:
retainin interfaceOpenSslKeyMaterial- Specified by:
retainin interfaceReferenceCounted- Overrides:
retainin classAbstractReferenceCounted
-
touch
public DefaultOpenSslKeyMaterial touch()
Description copied from interface:ReferenceCountedRecords the current access location of this object for debugging purposes. If this object is determined to be leaked, the information recorded by this operation will be provided to you viaResourceLeakDetector. This method is a shortcut totouch(null).- Specified by:
touchin interfaceOpenSslKeyMaterial- Specified by:
touchin interfaceReferenceCounted- Overrides:
touchin classAbstractReferenceCounted
-
touch
public DefaultOpenSslKeyMaterial touch(java.lang.Object hint)
Description copied from interface:ReferenceCountedRecords the current access location of this object with an additional arbitrary information for debugging purposes. If this object is determined to be leaked, the information recorded by this operation will be provided to you viaResourceLeakDetector.- Specified by:
touchin interfaceOpenSslKeyMaterial- Specified by:
touchin interfaceReferenceCounted
-
release
public boolean release()
Description copied from interface:ReferenceCountedDecreases the reference count by1and deallocates this object if the reference count reaches at0.- Specified by:
releasein interfaceOpenSslKeyMaterial- Specified by:
releasein interfaceReferenceCounted- Overrides:
releasein classAbstractReferenceCounted- Returns:
trueif and only if the reference count became0and this object has been deallocated
-
release
public boolean release(int decrement)
Description copied from interface:ReferenceCountedDecreases the reference count by the specifieddecrementand deallocates this object if the reference count reaches at0.- Specified by:
releasein interfaceOpenSslKeyMaterial- Specified by:
releasein interfaceReferenceCounted- Overrides:
releasein classAbstractReferenceCounted- Returns:
trueif and only if the reference count became0and this object has been deallocated
-
-