public class ThreadLocalMarshallerProvider extends java.lang.Object implements MarshallerProvider
UnmarshallerProvider
implementation which use a ThreadLocal
to store references
to Marshaller
instances. This may give you some performance boost if you need to marshall
many small Object
's and your actual Thread count is not to big构造器和说明 |
---|
ThreadLocalMarshallerProvider(MarshallerFactory factory,
MarshallingConfiguration config)
Create a new instance of the
ThreadLocalMarshallerProvider |
限定符和类型 | 方法和说明 |
---|---|
Marshaller |
getMarshaller(ChannelHandlerContext ctx)
Get a
Marshaller for the given ChannelHandlerContext |
public ThreadLocalMarshallerProvider(MarshallerFactory factory, MarshallingConfiguration config)
ThreadLocalMarshallerProvider
factory
- the MarshallerFactory
to use to create Marshaller
's if neededconfig
- the MarshallingConfiguration
to usepublic Marshaller getMarshaller(ChannelHandlerContext ctx) throws java.lang.Exception
MarshallerProvider
Marshaller
for the given ChannelHandlerContext
getMarshaller
在接口中 MarshallerProvider
java.lang.Exception