io.netty.handler.codec.http.websocketx.WebSocketClientProtocolHandler.ClientHandshakeStateEvent Java Examples

The following examples show how to use io.netty.handler.codec.http.websocketx.WebSocketClientProtocolHandler.ClientHandshakeStateEvent. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ForwardClientSocketClientHandler.java    From arthas with Apache License 2.0 5 votes vote down vote up
@Override
public void userEventTriggered(final ChannelHandlerContext ctx, Object evt) {
    if (evt.equals(ClientHandshakeStateEvent.HANDSHAKE_COMPLETE)) {
        try {
            connectLocalServer(ctx);
        } catch (Throwable e) {
            logger.error("ForwardClientSocketClientHandler connect local arthas server error", e);
        }
    } else {
        ctx.fireUserEventTriggered(evt);
    }
}
 
Example #2
Source File: LocalFrameHandler.java    From arthas with Apache License 2.0 5 votes vote down vote up
@Override
public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception {
    super.userEventTriggered(ctx, evt);
    if (evt instanceof ClientHandshakeStateEvent) {
        if (evt.equals(ClientHandshakeStateEvent.HANDSHAKE_COMPLETE)) {
            handshakeFuture.setSuccess();
        }
    }
}