Package io.netty.handler.ssl
Class OpenSslPrivateKey
- java.lang.Object
-
- io.netty.util.AbstractReferenceCounted
-
- io.netty.handler.ssl.OpenSslPrivateKey
-
- All Implemented Interfaces:
ReferenceCounted,java.io.Serializable,java.security.Key,java.security.PrivateKey,javax.security.auth.Destroyable
final class OpenSslPrivateKey extends AbstractReferenceCounted implements java.security.PrivateKey
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) classOpenSslPrivateKey.OpenSslPrivateKeyMaterial
-
Field Summary
Fields Modifier and Type Field Description private longprivateKeyAddress
-
Constructor Summary
Constructors Constructor Description OpenSslPrivateKey(long privateKeyAddress)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddeallocate()Called onceAbstractReferenceCounted.refCnt()is equals 0.voiddestroy()NOTE: This is a JDK8 interface/method.java.lang.StringgetAlgorithm()byte[]getEncoded()java.lang.StringgetFormat()booleanisDestroyed()NOTE: This is a JDK8 interface/method.(package private) OpenSslKeyMaterialnewKeyMaterial(long certificateChain, java.security.cert.X509Certificate[] chain)Create a newOpenSslKeyMaterialwhich uses the private key that is held byOpenSslPrivateKey.private longprivateKeyAddress()OpenSslPrivateKeyretain()Increases the reference count by1.OpenSslPrivateKeyretain(int increment)Increases the reference count by the specifiedincrement.OpenSslPrivateKeytouch()Records the current access location of this object for debugging purposes.OpenSslPrivateKeytouch(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, release, release, setRefCnt
-
-
-
-
Method Detail
-
getAlgorithm
public java.lang.String getAlgorithm()
- Specified by:
getAlgorithmin interfacejava.security.Key
-
getFormat
public java.lang.String getFormat()
- Specified by:
getFormatin interfacejava.security.Key
-
getEncoded
public byte[] getEncoded()
- Specified by:
getEncodedin interfacejava.security.Key
-
privateKeyAddress
private long privateKeyAddress()
-
deallocate
protected void deallocate()
Description copied from class:AbstractReferenceCountedCalled onceAbstractReferenceCounted.refCnt()is equals 0.- Specified by:
deallocatein classAbstractReferenceCounted
-
retain
public OpenSslPrivateKey retain()
Description copied from interface:ReferenceCountedIncreases the reference count by1.- Specified by:
retainin interfaceReferenceCounted- Overrides:
retainin classAbstractReferenceCounted
-
retain
public OpenSslPrivateKey retain(int increment)
Description copied from interface:ReferenceCountedIncreases the reference count by the specifiedincrement.- Specified by:
retainin interfaceReferenceCounted- Overrides:
retainin classAbstractReferenceCounted
-
touch
public OpenSslPrivateKey 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 interfaceReferenceCounted- Overrides:
touchin classAbstractReferenceCounted
-
touch
public OpenSslPrivateKey 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 interfaceReferenceCounted
-
destroy
public void destroy()
NOTE: This is a JDK8 interface/method. Due to backwards compatibility reasons it's not possible to slap the@Overrideannotation onto this method.- Specified by:
destroyin interfacejavax.security.auth.Destroyable- See Also:
Destroyable.destroy()
-
isDestroyed
public boolean isDestroyed()
NOTE: This is a JDK8 interface/method. Due to backwards compatibility reasons it's not possible to slap the@Overrideannotation onto this method.- Specified by:
isDestroyedin interfacejavax.security.auth.Destroyable- See Also:
Destroyable.isDestroyed()
-
newKeyMaterial
OpenSslKeyMaterial newKeyMaterial(long certificateChain, java.security.cert.X509Certificate[] chain)
Create a newOpenSslKeyMaterialwhich uses the private key that is held byOpenSslPrivateKey. When the material is created we increment the reference count of the enclosingOpenSslPrivateKeyand decrement it again when the reference count of theOpenSslKeyMaterialreaches0.
-
-