public class ThreadLocalUnmarshallerProvider extends java.lang.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.| Modifier and Type | Field and Description |
|---|---|
private org.jboss.marshalling.MarshallingConfiguration |
config |
private org.jboss.marshalling.MarshallerFactory |
factory |
private FastThreadLocal<org.jboss.marshalling.Unmarshaller> |
unmarshallers |
| 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(ChannelHandlerContext ctx)
Get the
Unmarshaller for the given ChannelHandlerContext |
private final FastThreadLocal<org.jboss.marshalling.Unmarshaller> unmarshallers
private final org.jboss.marshalling.MarshallerFactory factory
private final org.jboss.marshalling.MarshallingConfiguration config
public ThreadLocalUnmarshallerProvider(org.jboss.marshalling.MarshallerFactory factory,
org.jboss.marshalling.MarshallingConfiguration config)
ThreadLocalUnmarshallerProviderfactory - the MarshallerFactory to use to create Unmarshaller's if neededconfig - the MarshallingConfiguration to usepublic org.jboss.marshalling.Unmarshaller getUnmarshaller(ChannelHandlerContext ctx) throws java.lang.Exception
UnmarshallerProviderUnmarshaller for the given ChannelHandlerContextgetUnmarshaller in interface UnmarshallerProviderjava.lang.Exception