2012-06-07 16:56:21 +09:00
|
|
|
package io.netty.channel;
|
|
|
|
|
|
|
|
import java.net.SocketAddress;
|
|
|
|
|
|
|
|
public class ChannelOperationHandlerAdapter implements ChannelOperationHandler {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void beforeAdd(ChannelHandlerContext ctx) throws Exception {
|
|
|
|
// NOOP
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void afterAdd(ChannelHandlerContext ctx) throws Exception {
|
|
|
|
// NOOP
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void beforeRemove(ChannelHandlerContext ctx) throws Exception {
|
|
|
|
// NOOP
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void afterRemove(ChannelHandlerContext ctx) throws Exception {
|
|
|
|
// NOOP
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause)
|
|
|
|
throws Exception {
|
|
|
|
ctx.fireExceptionCaught(cause);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void userEventTriggered(ChannelHandlerContext ctx, Object evt)
|
|
|
|
throws Exception {
|
|
|
|
ctx.fireUserEventTriggered(evt);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void bind(ChannelHandlerContext ctx, SocketAddress localAddress,
|
|
|
|
ChannelFuture future) throws Exception {
|
|
|
|
ctx.bind(localAddress, future);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void connect(ChannelHandlerContext ctx, SocketAddress remoteAddress,
|
|
|
|
SocketAddress localAddress, ChannelFuture future) throws Exception {
|
|
|
|
ctx.connect(remoteAddress, localAddress, future);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void disconnect(ChannelHandlerContext ctx, ChannelFuture future)
|
|
|
|
throws Exception {
|
|
|
|
ctx.disconnect(future);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void close(ChannelHandlerContext ctx, ChannelFuture future)
|
|
|
|
throws Exception {
|
|
|
|
ctx.close(future);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void deregister(ChannelHandlerContext ctx, ChannelFuture future)
|
|
|
|
throws Exception {
|
|
|
|
ctx.deregister(future);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void flush(ChannelHandlerContext ctx, ChannelFuture future)
|
|
|
|
throws Exception {
|
2012-06-07 17:25:15 +09:00
|
|
|
ChannelHandlerAdapter.flush0(ctx, future);
|
2012-06-07 16:56:21 +09:00
|
|
|
}
|
|
|
|
}
|