public class DefaultNettyCamelStateCorrelationManager extends Object implements NettyCamelStateCorrelationManager
| Constructor and Description |
|---|
DefaultNettyCamelStateCorrelationManager() |
| Modifier and Type | Method and 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.
|
public DefaultNettyCamelStateCorrelationManager()
public void putState(io.netty.channel.Channel channel,
NettyCamelState state)
NettyCamelStateCorrelationManagerNettyCamelState instance.putState in interface NettyCamelStateCorrelationManagerchannel - the channelstate - the Camel state to be storedpublic void removeState(io.netty.channel.ChannelHandlerContext ctx,
io.netty.channel.Channel channel)
NettyCamelStateCorrelationManagerremoveState in interface NettyCamelStateCorrelationManagerctx - netty channel handler contextchannel - the channelpublic NettyCamelState getState(io.netty.channel.ChannelHandlerContext ctx, io.netty.channel.Channel channel, Object msg)
NettyCamelStateCorrelationManagerMap 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.getState in interface NettyCamelStateCorrelationManagerctx - netty channel handler contextchannel - the channelmsg - the response messagepublic NettyCamelState getState(io.netty.channel.ChannelHandlerContext ctx, io.netty.channel.Channel channel, Throwable cause)
NettyCamelStateCorrelationManagergetState in interface NettyCamelStateCorrelationManagerctx - netty channel handler contextchannel - the channelcause - the errorApache Camel