List of usage examples for io.netty.handler.ssl SniCompletionEvent hostname
String hostname
To view the source code for io.netty.handler.ssl SniCompletionEvent hostname.
Click Source Link
From source file:io.vertx.core.net.impl.SslHandshakeCompletionHandler.java
License:Open Source License
@Override public void userEventTriggered(ChannelHandlerContext ctx, Object evt) { if (evt instanceof SniCompletionEvent) { // Shall we care ? SniCompletionEvent completion = (SniCompletionEvent) evt; Attribute<String> val = ctx.channel().attr(SERVER_NAME_ATTR); val.set(completion.hostname()); } else if (evt instanceof SslHandshakeCompletionEvent) { SslHandshakeCompletionEvent completion = (SslHandshakeCompletionEvent) evt; if (completion.isSuccess()) { ctx.pipeline().remove(this); handler.handle(Future.succeededFuture(ctx.channel())); } else {// w w w . ja va2s . co m handler.handle(Future.failedFuture(completion.cause())); } } else { ctx.fireUserEventTriggered(evt); } }