All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.netty.channel.ChannelInboundInvoker Maven / Gradle / Ivy

There is a newer version: 5.0.0.Alpha2
Show newest version
/*
 * Copyright 2012 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;


/**
 * Interface which is shared by others which need to fire inbound events
 */
interface ChannelInboundInvoker {

    /**
     * A {@link Channel} was registered to its {@link EventLoop}.
     *
     * This will result in having the  {@link ChannelStateHandler#channelRegistered(ChannelHandlerContext)} method
     * called of the next  {@link ChannelStateHandler} contained in the  {@link ChannelPipeline} of the
     * {@link Channel}.
     */
    ChannelInboundInvoker fireChannelRegistered();

    /**
     * A {@link Channel} was unregistered from its {@link EventLoop}.
     *
     * This will result in having the  {@link ChannelStateHandler#channelUnregistered(ChannelHandlerContext)} method
     * called of the next  {@link ChannelStateHandler} contained in the  {@link ChannelPipeline} of the
     * {@link Channel}.
     */
    ChannelInboundInvoker fireChannelUnregistered();

    /**
     * A {@link Channel} is active now, which means it is connected.
     *
     * This will result in having the  {@link ChannelStateHandler#channelActive(ChannelHandlerContext)} method
     * called of the next  {@link ChannelStateHandler} contained in the  {@link ChannelPipeline} of the
     * {@link Channel}.
     */
    ChannelInboundInvoker fireChannelActive();

    /**
     * A {@link Channel} is inactive now, which means it is closed.
     *
     * This will result in having the  {@link ChannelStateHandler#channelInactive(ChannelHandlerContext)} method
     * called of the next  {@link ChannelStateHandler} contained in the  {@link ChannelPipeline} of the
     * {@link Channel}.
     */
    ChannelInboundInvoker fireChannelInactive();

    /**
     * A {@link Channel} received an {@link Throwable} in one of its inbound operations.
     *
     * This will result in having the  {@link ChannelStateHandler#exceptionCaught(ChannelHandlerContext, Throwable)}
     * method  called of the next  {@link ChannelStateHandler} contained in the  {@link ChannelPipeline} of the
     * {@link Channel}.
     */
    ChannelInboundInvoker fireExceptionCaught(Throwable cause);

    /**
     * A {@link Channel} received an user defined event.
     *
     * This will result in having the  {@link ChannelStateHandler#userEventTriggered(ChannelHandlerContext, Object)}
     * method  called of the next  {@link ChannelStateHandler} contained in the  {@link ChannelPipeline} of the
     * {@link Channel}.
     */
    ChannelInboundInvoker fireUserEventTriggered(Object event);

    /**
     * A {@link Channel} received bytes which are now ready to read from its inbound buffer.
     *
     * This will result in having the  {@link ChannelStateHandler#inboundBufferUpdated(ChannelHandlerContext)}
     * method  called of the next  {@link ChannelStateHandler} contained in the  {@link ChannelPipeline} of the
     * {@link Channel}.
     */
    ChannelInboundInvoker fireInboundBufferUpdated();

    /**
     * Triggers an {@link ChannelStateHandler#channelReadSuspended(ChannelHandlerContext) channelReadSuspended}
     * event to the next {@link ChannelStateHandler} in the {@link ChannelPipeline}.
     */
    ChannelInboundInvoker fireChannelReadSuspended();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy