public class ContextBoundUnmarshallerProvider extends DefaultUnmarshallerProvider
UnmarshallerProvider
which store a reference to the Unmarshaller
in the
ChannelHandlerContext
via the ChannelHandlerContext.attr(AttributeKey)
method. So the same Unmarshaller
will be used during the life-time of a Channel
for the ChannelHandler
's ChannelHandlerContext
.Constructor and Description |
---|
ContextBoundUnmarshallerProvider(MarshallerFactory factory,
MarshallingConfiguration config) |
Modifier and Type | Method and Description |
---|---|
Unmarshaller |
getUnmarshaller(ChannelHandlerContext ctx)
Get the
Unmarshaller for the given ChannelHandlerContext |
public ContextBoundUnmarshallerProvider(MarshallerFactory factory, MarshallingConfiguration config)
public Unmarshaller getUnmarshaller(ChannelHandlerContext ctx) throws Exception
UnmarshallerProvider
Unmarshaller
for the given ChannelHandlerContext
getUnmarshaller
in interface UnmarshallerProvider
getUnmarshaller
in class DefaultUnmarshallerProvider
Exception
Copyright © 2008–2021 The Netty Project. All rights reserved.