Interface NettyCamelStateCorrelationManager

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      NettyCamelState getState​(io.netty.channel.ChannelHandlerContext ctx, io.netty.channel.Channel channel, Object msg)
      Gets the state when a response message has been received.
      NettyCamelState getState​(io.netty.channel.ChannelHandlerContext ctx, io.netty.channel.Channel channel, Throwable cause)
      Gets the state when some internal error occurred.
      void putState​(io.netty.channel.Channel channel, NettyCamelState state)
      Puts the state.
      void removeState​(io.netty.channel.ChannelHandlerContext ctx, io.netty.channel.Channel channel)
      Removes the state when the channel is inactive.
    • Method Detail

      • putState

        void putState​(io.netty.channel.Channel channel,
                      NettyCamelState state)
        Puts the state.

        You can get access to the Camel message from the NettyCamelState instance.

        Parameters:
        channel - the channel
        state - the Camel state to be stored
      • removeState

        void removeState​(io.netty.channel.ChannelHandlerContext ctx,
                         io.netty.channel.Channel channel)
        Removes the state when the channel is inactive.
        Parameters:
        ctx - netty channel handler context
        channel - the channel
      • getState

        NettyCamelState getState​(io.netty.channel.ChannelHandlerContext ctx,
                                 io.netty.channel.Channel channel,
                                 Object msg)
        Gets the state when a response message has been received.

        If the implementation stores the state temporary in for example a Map instance then this method should remove the state from the map as its no longer needed. In other words use the Map.remove(Object) to get and remove the state.

        Parameters:
        ctx - netty channel handler context
        channel - the channel
        msg - the response message
      • getState

        NettyCamelState getState​(io.netty.channel.ChannelHandlerContext ctx,
                                 io.netty.channel.Channel channel,
                                 Throwable cause)
        Gets the state when some internal error occurred.
        Parameters:
        ctx - netty channel handler context
        channel - the channel
        cause - the error