Top Description Fields Constructors Methods
io.netty.handler.codec.marshalling

public Class ThreadLocalUnmarshallerProvider

extends Object
implements UnmarshallerProvider
Class Inheritance
All Implemented Interfaces
io.netty.handler.codec.marshalling.UnmarshallerProvider
Imports
io.netty.channel.ChannelHandlerContext, io.netty.util.concurrent.FastThreadLocal, org.jboss.marshalling.MarshallerFactory, .MarshallingConfiguration, .Unmarshaller

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.

Field Summary

Modifier and TypeField and Description
private final MarshallingConfiguration
private final MarshallerFactory
private final FastThreadLocal<Unmarshaller>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Unmarshaller
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

configback to summary
private final MarshallingConfiguration config
factoryback to summary
private final MarshallerFactory factory
unmarshallersback to summary
private final FastThreadLocal<Unmarshaller> unmarshallers

Constructor Detail

ThreadLocalUnmarshallerProviderback to summary
public ThreadLocalUnmarshallerProvider(MarshallerFactory factory, MarshallingConfiguration config)

Create a new instance of the ThreadLocalUnmarshallerProvider

Parameters
factory:MarshallerFactory

the MarshallerFactory to use to create Unmarshaller's if needed

config:MarshallingConfiguration

the MarshallingConfiguration to use

Method Detail

getUnmarshallerback to summary
public Unmarshaller getUnmarshaller(ChannelHandlerContext ctx) throws Exception

Implements io.netty.handler.codec.marshalling.UnmarshallerProvider.getUnmarshaller.

Doc from io.netty.handler.codec.marshalling.UnmarshallerProvider.getUnmarshaller.

Get the Unmarshaller for the given ChannelHandlerContext

Annotations
@Override