public abstract class SslContextBasic extends Object implements SslContext
SslContext interface that provides SSL handshake support| 限定符和类型 | 字段和说明 |
|---|---|
protected long |
channelID |
protected boolean |
netLog |
protected PipeContext |
pipeContext |
protected SoContext |
soContext |
protected SslConfig |
sslConfig |
protected boolean |
sslLog |
protected SslMode |
sslMode |
protected boolean |
sslStatus |
| 构造器和说明 |
|---|
SslContextBasic(long channelID,
SslConfig config,
PipeContext pipeContext,
boolean clientMode) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
closeSSL()
switch to no encryption, there is keep connect, close SSL.
|
protected abstract SSLEngine |
configSslEngine(SSLContext sslContext,
SSLEngine engine)
create SSLEngine
|
protected KeyManagerFactory |
createKeyManagerFactory(KeyStore keyStore)
create KeyManagerFactory
|
protected KeyStore |
createKeyStore()
create KeyStore
|
protected abstract SSLContext |
createSSLContext()
create SSLContext
|
SslConfig |
getConfig()
return ssl config.
|
protected net.hasor.neta.handler.ssl.SslEngineWrap |
getEngine() |
String |
getPeerHost()
Returns the host name of the peer of this session.
|
int |
getPeerPort()
Returns the host name of the peer of this session.
|
protected TrustManagerFactory |
getTrustManagers(KeyStore keyStore)
create TrustManagerFactory
|
PipeStatus |
handRcv(PipeRcvQueue<ByteBuf> rcvUp,
PipeSndQueue<ByteBuf> rcvDown,
PipeRcvQueue<ByteBuf> sndUp,
PipeSndQueue<ByteBuf> sndDown)
Receiving SSL data
|
PipeStatus |
handSnd(PipeRcvQueue<ByteBuf> rcvUp,
PipeSndQueue<ByteBuf> rcvDown,
PipeRcvQueue<ByteBuf> sndUp,
PipeSndQueue<ByteBuf> sndDown)
Sending SSL data
|
boolean |
isClient()
SSL Client side
|
boolean |
isServer()
SSL server side
|
void |
openSSL()
switch to encryption, there is keep connect, close SSL.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetApplicationProtocolprotected final long channelID
protected final PipeContext pipeContext
protected final SoContext soContext
protected final boolean sslLog
protected final boolean netLog
protected final SslConfig sslConfig
protected volatile boolean sslStatus
protected SslMode sslMode
public SslContextBasic(long channelID,
SslConfig config,
PipeContext pipeContext,
boolean clientMode)
throws Exception
Exceptionprotected net.hasor.neta.handler.ssl.SslEngineWrap getEngine()
public boolean isServer()
SslContextisServer 在接口中 SslContextpublic boolean isClient()
SslContextisClient 在接口中 SslContextpublic String getPeerHost()
SslContextgetPeerHost 在接口中 SslContextpublic int getPeerPort()
SslContextgetPeerPort 在接口中 SslContextpublic SslConfig getConfig()
SslContextgetConfig 在接口中 SslContextprotected KeyStore createKeyStore() throws GeneralSecurityException, IOException
protected KeyManagerFactory createKeyManagerFactory(KeyStore keyStore) throws GeneralSecurityException, IOException
protected TrustManagerFactory getTrustManagers(KeyStore keyStore) throws GeneralSecurityException, IOException
protected abstract SSLContext createSSLContext() throws GeneralSecurityException, IOException
protected abstract SSLEngine configSslEngine(SSLContext sslContext, SSLEngine engine) throws IOException
IOExceptionpublic PipeStatus handRcv(PipeRcvQueue<ByteBuf> rcvUp, PipeSndQueue<ByteBuf> rcvDown, PipeRcvQueue<ByteBuf> sndUp, PipeSndQueue<ByteBuf> sndDown) throws IOException
IOExceptionpublic PipeStatus handSnd(PipeRcvQueue<ByteBuf> rcvUp, PipeSndQueue<ByteBuf> rcvDown, PipeRcvQueue<ByteBuf> sndUp, PipeSndQueue<ByteBuf> sndDown) throws IOException
IOExceptionpublic void closeSSL()
SslContextcloseSSL 在接口中 SslContextpublic void openSSL()
SslContextopenSSL 在接口中 SslContextCopyright © 2022–2024. All rights reserved.