Class CloseHandler


  • public abstract class CloseHandler
    extends java.lang.Object
    Contract between protocol codecs and a close handler.
    • Field Detail

      • UNSUPPORTED_PROTOCOL_CLOSE_HANDLER

        public static final CloseHandler UNSUPPORTED_PROTOCOL_CLOSE_HANDLER
      • PROTOCOL_OUTBOUND_CLOSE_HANDLER

        public static final CloseHandler PROTOCOL_OUTBOUND_CLOSE_HANDLER
    • Constructor Detail

      • CloseHandler

        public CloseHandler()
    • Method Detail

      • forPipelinedRequestResponse

        public static CloseHandler forPipelinedRequestResponse​(boolean client,
                                                               io.netty.channel.ChannelConfig config)
        New CloseHandler instance.
        Parameters:
        client - operation mode, TRUE for client or FALSE for server
        config - The ChannelConfig associated with the channel to create the CloseHandler for. This ChannelConfig maybe modified to ensure the underlying options allow for half-closure.
        Returns:
        a new connection close handler with behavior for a pipelined request/response client or server
      • protocolPayloadBeginInbound

        public abstract void protocolPayloadBeginInbound​(io.netty.channel.ChannelHandlerContext ctx)
        Signal begin of inbound payload, to be emitted from the EventLoop for the Channel.
        Parameters:
        ctx - ChannelHandlerContext
      • protocolPayloadEndInbound

        public abstract void protocolPayloadEndInbound​(io.netty.channel.ChannelHandlerContext ctx)
        Signal end of inbound payload, to be emitted from the EventLoop for the Channel.
        Parameters:
        ctx - ChannelHandlerContext
      • protocolPayloadBeginOutbound

        public abstract void protocolPayloadBeginOutbound​(io.netty.channel.ChannelHandlerContext ctx)
        Signal begin of outbound payload, to be emitted from the EventLoop for the Channel.
        Parameters:
        ctx - ChannelHandlerContext
      • protocolPayloadEndOutbound

        public abstract void protocolPayloadEndOutbound​(io.netty.channel.ChannelHandlerContext ctx)
        Signal end of outbound payload, to be emitted from the EventLoop for the Channel.
        Parameters:
        ctx - ChannelHandlerContext
      • protocolPayloadEndOutboundSuccess

        public abstract void protocolPayloadEndOutboundSuccess​(io.netty.channel.ChannelHandlerContext ctx)
        Signal end of outbound payload, once successfully written to the Channel.
        Parameters:
        ctx - ChannelHandlerContext
      • protocolClosingInbound

        public abstract void protocolClosingInbound​(io.netty.channel.ChannelHandlerContext ctx)
        Signal inbound close command observed, to be emitted from the EventLoop for the Channel.
        Parameters:
        ctx - ChannelHandlerContext
      • protocolClosingOutbound

        public abstract void protocolClosingOutbound​(io.netty.channel.ChannelHandlerContext ctx)
        Signal outbound close command observed, to be emitted from the EventLoop for the Channel.
        Parameters:
        ctx - ChannelHandlerContext