public class ThreadLocalUnmarshallerProvider extends java.lang.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.构造器和说明 |
---|
ThreadLocalUnmarshallerProvider(MarshallerFactory factory,
MarshallingConfiguration config)
Create a new instance of the
ThreadLocalUnmarshallerProvider |
限定符和类型 | 方法和说明 |
---|---|
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 java.lang.Exception
UnmarshallerProvider
Unmarshaller
for the given ChannelHandlerContext
getUnmarshaller
在接口中 UnmarshallerProvider
java.lang.Exception