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(org.jboss.marshalling.MarshallerFactory factory,
org.jboss.marshalling.MarshallingConfiguration config)
Create a new instance of the
ThreadLocalUnmarshallerProvider |
Modifier and Type | Method and Description |
---|---|
org.jboss.marshalling.Unmarshaller |
getUnmarshaller(io.netty.channel.ChannelHandlerContext ctx)
Get the
Unmarshaller for the given ChannelHandlerContext |
public ThreadLocalUnmarshallerProvider(org.jboss.marshalling.MarshallerFactory factory, org.jboss.marshalling.MarshallingConfiguration config)
ThreadLocalUnmarshallerProvider
factory
- the MarshallerFactory
to use to create Unmarshaller
's if neededconfig
- the MarshallingConfiguration
to usepublic org.jboss.marshalling.Unmarshaller getUnmarshaller(io.netty.channel.ChannelHandlerContext ctx) throws Exception
UnmarshallerProvider
Unmarshaller
for the given ChannelHandlerContext
getUnmarshaller
in interface UnmarshallerProvider
Exception
Copyright © 2008–2019 The Netty Project. All rights reserved.