com.alibaba.dubbo.remoting.transport.netty4
Class NettyClientHandler
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.channel.ChannelDuplexHandler
com.alibaba.dubbo.remoting.transport.netty4.NettyClientHandler
- All Implemented Interfaces:
- io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler, io.netty.channel.ChannelOutboundHandler
@ChannelHandler.Sharable
public class NettyClientHandler
- extends io.netty.channel.ChannelDuplexHandler
NettyClientHandler
- Author:
- william.liangf, qinliujie
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler |
io.netty.channel.ChannelHandler.Sharable |
Method Summary |
void |
channelActive(io.netty.channel.ChannelHandlerContext ctx)
|
void |
channelInactive(io.netty.channel.ChannelHandlerContext ctx)
|
void |
channelRead(io.netty.channel.ChannelHandlerContext ctx,
Object msg)
|
void |
disconnect(io.netty.channel.ChannelHandlerContext ctx,
io.netty.channel.ChannelPromise future)
|
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause)
|
void |
write(io.netty.channel.ChannelHandlerContext ctx,
Object msg,
io.netty.channel.ChannelPromise promise)
|
Methods inherited from class io.netty.channel.ChannelDuplexHandler |
bind, close, connect, deregister, flush, read |
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter |
channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggered |
Methods inherited from class io.netty.channel.ChannelHandlerAdapter |
handlerAdded, handlerRemoved, isSharable |
Methods inherited from interface io.netty.channel.ChannelHandler |
handlerAdded, handlerRemoved |
NettyClientHandler
public NettyClientHandler(URL url,
ChannelHandler handler)
channelActive
public void channelActive(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
- Specified by:
channelActive
in interface io.netty.channel.ChannelInboundHandler
- Overrides:
channelActive
in class io.netty.channel.ChannelInboundHandlerAdapter
- Throws:
Exception
channelInactive
public void channelInactive(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
- Specified by:
channelInactive
in interface io.netty.channel.ChannelInboundHandler
- Overrides:
channelInactive
in class io.netty.channel.ChannelInboundHandlerAdapter
- Throws:
Exception
disconnect
public void disconnect(io.netty.channel.ChannelHandlerContext ctx,
io.netty.channel.ChannelPromise future)
throws Exception
- Specified by:
disconnect
in interface io.netty.channel.ChannelOutboundHandler
- Overrides:
disconnect
in class io.netty.channel.ChannelDuplexHandler
- Throws:
Exception
channelRead
public void channelRead(io.netty.channel.ChannelHandlerContext ctx,
Object msg)
throws Exception
- Specified by:
channelRead
in interface io.netty.channel.ChannelInboundHandler
- Overrides:
channelRead
in class io.netty.channel.ChannelInboundHandlerAdapter
- Throws:
Exception
write
public void write(io.netty.channel.ChannelHandlerContext ctx,
Object msg,
io.netty.channel.ChannelPromise promise)
throws Exception
- Specified by:
write
in interface io.netty.channel.ChannelOutboundHandler
- Overrides:
write
in class io.netty.channel.ChannelDuplexHandler
- Throws:
Exception
exceptionCaught
public void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause)
throws Exception
- Specified by:
exceptionCaught
in interface io.netty.channel.ChannelHandler
- Specified by:
exceptionCaught
in interface io.netty.channel.ChannelInboundHandler
- Overrides:
exceptionCaught
in class io.netty.channel.ChannelInboundHandlerAdapter
- Throws:
Exception
Copyright © 2012–2017 Alibaba. All rights reserved.