public class ThreadLocalUnmarshallerProvider extends Object implements UnmarshallerProvider
UnmarshallerProvider
implementation which use a ThreadLocal
to store references
to Unmarshaller
instances. This may give you some performance boost if you need to unmarshall
many small Object
's.Constructor and Description |
---|
ThreadLocalUnmarshallerProvider(MarshallerFactory factory,
MarshallingConfiguration config)
Create a new instance of the
ThreadLocalUnmarshallerProvider |
Modifier and Type | Method and Description |
---|---|
Unmarshaller |
getUnmarshaller(ChannelHandlerContext ctx)
Get the
Unmarshaller for the given ChannelHandlerContext |
public ThreadLocalUnmarshallerProvider(MarshallerFactory factory, MarshallingConfiguration config)
ThreadLocalUnmarshallerProvider
factory
- the MarshallerFactory
to use to create Unmarshaller
's if neededconfig
- the MarshallingConfiguration
to usepublic Unmarshaller getUnmarshaller(ChannelHandlerContext ctx) throws Exception
UnmarshallerProvider
Unmarshaller
for the given ChannelHandlerContext
getUnmarshaller
in interface UnmarshallerProvider
Exception
Copyright © 2008–2021 The Netty Project. All rights reserved.