Class ThreadLocalUnmarshallerProvider
java.lang.Object
io.netty.handler.codec.marshalling.ThreadLocalUnmarshallerProvider
- All Implemented Interfaces:
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 Summary
ConstructorsConstructorDescriptionThreadLocalUnmarshallerProvider(org.jboss.marshalling.MarshallerFactory factory, org.jboss.marshalling.MarshallingConfiguration config) Create a new instance of theThreadLocalUnmarshallerProvider -
Method Summary
Modifier and TypeMethodDescriptionorg.jboss.marshalling.UnmarshallerGet theUnmarshallerfor the givenChannelHandlerContext
-
Constructor Details
-
ThreadLocalUnmarshallerProvider
public ThreadLocalUnmarshallerProvider(org.jboss.marshalling.MarshallerFactory factory, org.jboss.marshalling.MarshallingConfiguration config) Create a new instance of theThreadLocalUnmarshallerProvider- Parameters:
factory- theMarshallerFactoryto use to createUnmarshaller's if neededconfig- theMarshallingConfigurationto use
-
-
Method Details
-
getUnmarshaller
public org.jboss.marshalling.Unmarshaller getUnmarshaller(ChannelHandlerContext ctx) throws Exception Description copied from interface:UnmarshallerProviderGet theUnmarshallerfor the givenChannelHandlerContext- Specified by:
getUnmarshallerin interfaceUnmarshallerProvider- Throws:
Exception
-