public final class WaarpSslUtility extends Object
Modifier and Type | Field and Description |
---|---|
static io.netty.channel.ChannelFutureListener |
SSLCLOSE
Closing channel with SSL close at first step
|
Modifier and Type | Method and Description |
---|---|
static void |
addSslHandler(io.netty.channel.ChannelFuture future,
io.netty.channel.ChannelPipeline pipeline,
io.netty.channel.ChannelHandler sslHandler,
io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super io.netty.channel.Channel>> listener)
Add a SslHandler in a pipeline when the channel is already active
|
static void |
addSslOpenedChannel(io.netty.channel.Channel channel)
Add the Channel as SSL handshake will start soon
|
static io.netty.channel.ChannelFuture |
closingSslChannel(io.netty.channel.Channel channel)
Utility method to close a channel in SSL mode correctly (if any)
|
static void |
forceCloseAllSslChannels()
Utility to force all channels to be closed
|
static void |
removingSslHandler(io.netty.channel.ChannelFuture future,
io.netty.channel.Channel channel,
boolean close)
Remove the SslHandler (if any) cleanly
|
static io.netty.channel.Channel |
waitforChannelReady(io.netty.channel.ChannelFuture future)
Waiting for the channel to be opened and ready (Client side) (blocking
call)
|
static boolean |
waitForClosingSslChannel(io.netty.channel.Channel channel,
long delay)
Wait for the channel with SSL to be closed
|
static boolean |
waitForHandshake(io.netty.channel.Channel channel)
Wait for the handshake on the given channel (better to use addSslHandler
when handler is added after
channel is active)
|
public static final io.netty.channel.ChannelFutureListener SSLCLOSE
public static void addSslOpenedChannel(io.netty.channel.Channel channel)
channel
- public static void addSslHandler(io.netty.channel.ChannelFuture future, io.netty.channel.ChannelPipeline pipeline, io.netty.channel.ChannelHandler sslHandler, io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super io.netty.channel.Channel>> listener)
future
- might be null, condition to start to add the
handler to
the pipelinepipeline
- sslHandler
- listener
- action once the handshake is donepublic static boolean waitForHandshake(io.netty.channel.Channel channel)
channel
- public static io.netty.channel.Channel waitforChannelReady(io.netty.channel.ChannelFuture future)
future
- a future on connect onlypublic static void forceCloseAllSslChannels()
public static io.netty.channel.ChannelFuture closingSslChannel(io.netty.channel.Channel channel)
channel
- public static void removingSslHandler(io.netty.channel.ChannelFuture future, io.netty.channel.Channel channel, boolean close)
future
- if not null, wait for this future to be done to
removed
the sslhandlerchannel
- close
- True to close the channel, else to only remove itpublic static boolean waitForClosingSslChannel(io.netty.channel.Channel channel, long delay)
channel
- delay
- Copyright © 2009–2020 Waarp. All rights reserved.