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) class
OpenSslPrivateKey.OpenSslPrivateKeyMaterial
-
Field Summary
Fields Modifier and Type Field Description private long
privateKeyAddress
-
Constructor Summary
Constructors Constructor Description OpenSslPrivateKey(long privateKeyAddress)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
deallocate()
Called onceAbstractReferenceCounted.refCnt()
is equals 0.void
destroy()
NOTE: This is a JDK8 interface/method.java.lang.String
getAlgorithm()
byte[]
getEncoded()
java.lang.String
getFormat()
boolean
isDestroyed()
NOTE: This is a JDK8 interface/method.(package private) OpenSslKeyMaterial
newKeyMaterial(long certificateChain, java.security.cert.X509Certificate[] chain)
Create a newOpenSslKeyMaterial
which uses the private key that is held byOpenSslPrivateKey
.private long
privateKeyAddress()
OpenSslPrivateKey
retain()
Increases the reference count by1
.OpenSslPrivateKey
retain(int increment)
Increases the reference count by the specifiedincrement
.OpenSslPrivateKey
touch()
Records the current access location of this object for debugging purposes.OpenSslPrivateKey
touch(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:
getAlgorithm
in interfacejava.security.Key
-
getFormat
public java.lang.String getFormat()
- Specified by:
getFormat
in interfacejava.security.Key
-
getEncoded
public byte[] getEncoded()
- Specified by:
getEncoded
in interfacejava.security.Key
-
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
public OpenSslPrivateKey retain()
Description copied from interface:ReferenceCounted
Increases the reference count by1
.- Specified by:
retain
in interfaceReferenceCounted
- Overrides:
retain
in classAbstractReferenceCounted
-
retain
public OpenSslPrivateKey retain(int increment)
Description copied from interface:ReferenceCounted
Increases the reference count by the specifiedincrement
.- Specified by:
retain
in interfaceReferenceCounted
- Overrides:
retain
in classAbstractReferenceCounted
-
touch
public OpenSslPrivateKey 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
public OpenSslPrivateKey touch(java.lang.Object hint)
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 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@Override
annotation onto this method.- Specified by:
isDestroyed
in interfacejavax.security.auth.Destroyable
- See Also:
Destroyable.isDestroyed()
-
newKeyMaterial
OpenSslKeyMaterial newKeyMaterial(long certificateChain, java.security.cert.X509Certificate[] chain)
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
.
-
-