Package ch.loway.oss.ari4java.tools.http
Class NettyWSClientHandler
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.channel.SimpleChannelInboundHandler<Object>
ch.loway.oss.ari4java.tools.http.NettyHttpClientHandler
ch.loway.oss.ari4java.tools.http.NettyWSClientHandler
- All Implemented Interfaces:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler
NettyWSClientHandler handles the transactions with the remote
WebSocket, forwarding to the client HttpResponseHandler interface.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable -
Field Summary
Fields inherited from class ch.loway.oss.ari4java.tools.http.NettyHttpClientHandler
responseBytes, responseStatus -
Constructor Summary
ConstructorsConstructorDescriptionNettyWSClientHandler(io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker handshaker, NettyHttpClient client) -
Method Summary
Modifier and TypeMethodDescriptionvoidchannelActive(io.netty.channel.ChannelHandlerContext ctx) voidchannelInactive(io.netty.channel.ChannelHandlerContext ctx) protected voidchannelRead0(io.netty.channel.ChannelHandlerContext ctx, Object msg) voidexceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause) voidhandlerAdded(io.netty.channel.ChannelHandlerContext ctx) io.netty.channel.ChannelFuturebooleanvoidsetShuttingDown(boolean shuttingDown) Methods inherited from class ch.loway.oss.ari4java.tools.http.NettyHttpClientHandler
getException, getResponseBytes, getResponseStatus, getResponseText, reset, waitForResponseMethods inherited from class io.netty.channel.SimpleChannelInboundHandler
acceptInboundMessage, channelReadMethods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggeredMethods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerRemoved, isSharableMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.netty.channel.ChannelHandler
handlerRemoved
-
Constructor Details
-
NettyWSClientHandler
public NettyWSClientHandler(io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker handshaker, NettyHttpClient client)
-
-
Method Details
-
handshakeFuture
public io.netty.channel.ChannelFuture handshakeFuture() -
handlerAdded
public void handlerAdded(io.netty.channel.ChannelHandlerContext ctx) - Specified by:
handlerAddedin interfaceio.netty.channel.ChannelHandler- Overrides:
handlerAddedin classio.netty.channel.ChannelHandlerAdapter
-
channelActive
public void channelActive(io.netty.channel.ChannelHandlerContext ctx) - Specified by:
channelActivein interfaceio.netty.channel.ChannelInboundHandler- Overrides:
channelActivein classio.netty.channel.ChannelInboundHandlerAdapter
-
channelInactive
public void channelInactive(io.netty.channel.ChannelHandlerContext ctx) - Specified by:
channelInactivein interfaceio.netty.channel.ChannelInboundHandler- Overrides:
channelInactivein classio.netty.channel.ChannelInboundHandlerAdapter
-
channelRead0
protected void channelRead0(io.netty.channel.ChannelHandlerContext ctx, Object msg) throws Exception - Overrides:
channelRead0in classNettyHttpClientHandler- Throws:
Exception
-
exceptionCaught
- Specified by:
exceptionCaughtin interfaceio.netty.channel.ChannelHandler- Specified by:
exceptionCaughtin interfaceio.netty.channel.ChannelInboundHandler- Overrides:
exceptionCaughtin classNettyHttpClientHandler
-
isShuttingDown
public boolean isShuttingDown() -
setShuttingDown
public void setShuttingDown(boolean shuttingDown)
-