/*
* Copyright 2016 The Netty Project
*
* The Netty Project licenses this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.channel;
public interface ChannelInboundInvoker {
A Channel
was registered to its EventLoop
. This will result in having the ChannelInboundHandler.channelRegistered(ChannelHandlerContext)
method called of the next ChannelInboundHandler
contained in the ChannelPipeline
of the Channel
. /**
* A {@link Channel} was registered to its {@link EventLoop}.
*
* This will result in having the {@link ChannelInboundHandler#channelRegistered(ChannelHandlerContext)} method
* called of the next {@link ChannelInboundHandler} contained in the {@link ChannelPipeline} of the
* {@link Channel}.
*/
ChannelInboundInvoker fireChannelRegistered();
A Channel
was unregistered from its EventLoop
. This will result in having the ChannelInboundHandler.channelUnregistered(ChannelHandlerContext)
method called of the next ChannelInboundHandler
contained in the ChannelPipeline
of the Channel
. /**
* A {@link Channel} was unregistered from its {@link EventLoop}.
*
* This will result in having the {@link ChannelInboundHandler#channelUnregistered(ChannelHandlerContext)} method
* called of the next {@link ChannelInboundHandler} contained in the {@link ChannelPipeline} of the
* {@link Channel}.
*/
ChannelInboundInvoker fireChannelUnregistered();
A Channel
is active now, which means it is connected. This will result in having the ChannelInboundHandler.channelActive(ChannelHandlerContext)
method called of the next ChannelInboundHandler
contained in the ChannelPipeline
of the Channel
. /**
* A {@link Channel} is active now, which means it is connected.
*
* This will result in having the {@link ChannelInboundHandler#channelActive(ChannelHandlerContext)} method
* called of the next {@link ChannelInboundHandler} contained in the {@link ChannelPipeline} of the
* {@link Channel}.
*/
ChannelInboundInvoker fireChannelActive();
A Channel
is inactive now, which means it is closed. This will result in having the ChannelInboundHandler.channelInactive(ChannelHandlerContext)
method called of the next ChannelInboundHandler
contained in the ChannelPipeline
of the Channel
. /**
* A {@link Channel} is inactive now, which means it is closed.
*
* This will result in having the {@link ChannelInboundHandler#channelInactive(ChannelHandlerContext)} method
* called of the next {@link ChannelInboundHandler} contained in the {@link ChannelPipeline} of the
* {@link Channel}.
*/
ChannelInboundInvoker fireChannelInactive();
A Channel
received an Throwable
in one of its inbound operations. This will result in having the ChannelInboundHandler.exceptionCaught(ChannelHandlerContext, Throwable)
method called of the next ChannelInboundHandler
contained in the ChannelPipeline
of the Channel
. /**
* A {@link Channel} received an {@link Throwable} in one of its inbound operations.
*
* This will result in having the {@link ChannelInboundHandler#exceptionCaught(ChannelHandlerContext, Throwable)}
* method called of the next {@link ChannelInboundHandler} contained in the {@link ChannelPipeline} of the
* {@link Channel}.
*/
ChannelInboundInvoker fireExceptionCaught(Throwable cause);
A Channel
received an user defined event. This will result in having the ChannelInboundHandler.userEventTriggered(ChannelHandlerContext, Object)
method called of the next ChannelInboundHandler
contained in the ChannelPipeline
of the Channel
. /**
* A {@link Channel} received an user defined event.
*
* This will result in having the {@link ChannelInboundHandler#userEventTriggered(ChannelHandlerContext, Object)}
* method called of the next {@link ChannelInboundHandler} contained in the {@link ChannelPipeline} of the
* {@link Channel}.
*/
ChannelInboundInvoker fireUserEventTriggered(Object event);
A Channel
received a message. This will result in having the ChannelInboundHandler.channelRead(ChannelHandlerContext, Object)
method called of the next ChannelInboundHandler
contained in the ChannelPipeline
of the Channel
. /**
* A {@link Channel} received a message.
*
* This will result in having the {@link ChannelInboundHandler#channelRead(ChannelHandlerContext, Object)}
* method called of the next {@link ChannelInboundHandler} contained in the {@link ChannelPipeline} of the
* {@link Channel}.
*/
ChannelInboundInvoker fireChannelRead(Object msg);
Triggers an ChannelInboundHandler.channelReadComplete(ChannelHandlerContext)
event to the next ChannelInboundHandler
in the ChannelPipeline
. /**
* Triggers an {@link ChannelInboundHandler#channelReadComplete(ChannelHandlerContext)}
* event to the next {@link ChannelInboundHandler} in the {@link ChannelPipeline}.
*/
ChannelInboundInvoker fireChannelReadComplete();
Triggers an ChannelInboundHandler.channelWritabilityChanged(ChannelHandlerContext)
event to the next ChannelInboundHandler
in the ChannelPipeline
. /**
* Triggers an {@link ChannelInboundHandler#channelWritabilityChanged(ChannelHandlerContext)}
* event to the next {@link ChannelInboundHandler} in the {@link ChannelPipeline}.
*/
ChannelInboundInvoker fireChannelWritabilityChanged();
}