Package io.netty.handler.ssl
Class OpenSslPrivateKey
java.lang.Object
io.netty.util.AbstractReferenceCounted
io.netty.handler.ssl.OpenSslPrivateKey
- All Implemented Interfaces:
ReferenceCounted
,Serializable
,Key
,PrivateKey
,Destroyable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) final class
-
Field Summary
FieldsFields inherited from interface java.security.PrivateKey
serialVersionUID
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Called onceAbstractReferenceCounted.refCnt()
is equals 0.void
destroy()
NOTE: This is a JDK8 interface/method.byte[]
boolean
NOTE: This is a JDK8 interface/method.(package private) OpenSslKeyMaterial
newKeyMaterial
(long certificateChain, X509Certificate[] chain) Create a newOpenSslKeyMaterial
which uses the private key that is held byOpenSslPrivateKey
.private long
retain()
Increases the reference count by1
.retain
(int increment) Increases the reference count by the specifiedincrement
.touch()
Records the current access location of this object for debugging purposes.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
-
Field Details
-
privateKeyAddress
private long privateKeyAddress
-
-
Constructor Details
-
OpenSslPrivateKey
OpenSslPrivateKey(long privateKeyAddress)
-
-
Method Details
-
getAlgorithm
- Specified by:
getAlgorithm
in interfaceKey
-
getFormat
-
getEncoded
public byte[] getEncoded()- Specified by:
getEncoded
in interfaceKey
-
privateKeyAddress
private long privateKeyAddress() -
deallocate
protected void deallocate()Description copied from class:AbstractReferenceCounted
Called onceAbstractReferenceCounted.refCnt()
is equals 0.- Specified by:
deallocate
in classAbstractReferenceCounted
-
retain
Description copied from interface:ReferenceCounted
Increases the reference count by1
.- Specified by:
retain
in interfaceReferenceCounted
- Overrides:
retain
in classAbstractReferenceCounted
-
retain
Description copied from interface:ReferenceCounted
Increases the reference count by the specifiedincrement
.- Specified by:
retain
in interfaceReferenceCounted
- Overrides:
retain
in classAbstractReferenceCounted
-
touch
Description copied from interface:ReferenceCounted
Records 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:
touch
in interfaceReferenceCounted
- Overrides:
touch
in classAbstractReferenceCounted
-
touch
Description copied from interface:ReferenceCounted
Records 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:
touch
in interfaceReferenceCounted
-
destroy
public void destroy()NOTE: This is a JDK8 interface/method. Due to backwards compatibility reasons it's not possible to slap the@Override
annotation onto this method.- Specified by:
destroy
in interfaceDestroyable
- See Also:
-
isDestroyed
public boolean isDestroyed()NOTE: This is a JDK8 interface/method. Due to backwards compatibility reasons it's not possible to slap the@Override
annotation onto this method.- Specified by:
isDestroyed
in interfaceDestroyable
- See Also:
-
newKeyMaterial
Create a newOpenSslKeyMaterial
which uses the private key that is held byOpenSslPrivateKey
. When the material is created we increment the reference count of the enclosingOpenSslPrivateKey
and decrement it again when the reference count of theOpenSslKeyMaterial
reaches0
.
-