Class ThreadLocalUnmarshallerProvider
- java.lang.Object
-
- io.netty.handler.codec.marshalling.ThreadLocalUnmarshallerProvider
-
- All Implemented Interfaces:
UnmarshallerProvider
public class ThreadLocalUnmarshallerProvider extends java.lang.Object implements UnmarshallerProvider
UnmarshallerProvider
implementation which use aThreadLocal
to store references toUnmarshaller
instances. This may give you some performance boost if you need to unmarshall many smallObject
's.
-
-
Constructor Summary
Constructors Constructor Description ThreadLocalUnmarshallerProvider(org.jboss.marshalling.MarshallerFactory factory, org.jboss.marshalling.MarshallingConfiguration config)
Create a new instance of theThreadLocalUnmarshallerProvider
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.jboss.marshalling.Unmarshaller
getUnmarshaller(ChannelHandlerContext ctx)
Get theUnmarshaller
for the givenChannelHandlerContext
-
-
-
Constructor Detail
-
ThreadLocalUnmarshallerProvider
public ThreadLocalUnmarshallerProvider(org.jboss.marshalling.MarshallerFactory factory, org.jboss.marshalling.MarshallingConfiguration config)
Create a new instance of theThreadLocalUnmarshallerProvider
- Parameters:
factory
- theMarshallerFactory
to use to createUnmarshaller
's if neededconfig
- theMarshallingConfiguration
to use
-
-
Method Detail
-
getUnmarshaller
public org.jboss.marshalling.Unmarshaller getUnmarshaller(ChannelHandlerContext ctx) throws java.lang.Exception
Description copied from interface:UnmarshallerProvider
Get theUnmarshaller
for the givenChannelHandlerContext
- Specified by:
getUnmarshaller
in interfaceUnmarshallerProvider
- Throws:
java.lang.Exception
-
-