Package org.miaixz.bus.socket.plugins
Class SslPlugin<T>
java.lang.Object
org.miaixz.bus.socket.plugins.AbstractPlugin<T>
org.miaixz.bus.socket.plugins.SslPlugin<T>
- All Implemented Interfaces:
NetMonitor,Plugin<T>
SSL/TLS通信插件
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Constructor Summary
ConstructorsConstructorDescriptionSslPlugin(ClientSSLContextFactory factory) SslPlugin(ClientSSLContextFactory factory, BufferPool bufferPool) SslPlugin(ServerSSLContextFactory factory, ClientAuth clientAuth) SslPlugin(ServerSSLContextFactory factory, ClientAuth clientAuth, BufferPool bufferPool) SslPlugin(SSLContextFactory factory, Consumer<SSLEngine> consumer) SslPlugin(SSLContextFactory factory, Consumer<SSLEngine> consumer, BufferPool bufferPool) -
Method Summary
Methods inherited from class org.miaixz.bus.socket.plugins.AbstractPlugin
afterRead, afterWrite, beforeRead, beforeWrite, preProcess, stateEvent
-
Constructor Details
-
SslPlugin
- Throws:
Exception
-
SslPlugin
public SslPlugin(SSLContextFactory factory, Consumer<SSLEngine> consumer, BufferPool bufferPool) throws Exception - Throws:
Exception
-
SslPlugin
- Throws:
Exception
-
SslPlugin
- Throws:
Exception
-
SslPlugin
- Throws:
Exception
-
SslPlugin
public SslPlugin(ServerSSLContextFactory factory, ClientAuth clientAuth, BufferPool bufferPool) throws Exception - Throws:
Exception
-
-
Method Details
-
shouldAccept
Description copied from interface:NetMonitor监控已接收到的连接
- Specified by:
shouldAcceptin interfaceNetMonitor- Overrides:
shouldAcceptin classAbstractPlugin<T>- Parameters:
channel- 当前已经建立连接的通道对象- Returns:
- 非null:接受该连接,null:拒绝该连接
-