org.jboss.netty.handler.codec.marshalling

## Class ThreadLocalMarshallerProvider

- java.lang.Object
- - org.jboss.netty.handler.codec.marshalling.ThreadLocalMarshallerProvider

All Implemented Interfaces:
  MarshallerProvider

    public class ThreadLocalMarshallerProvider
    extends Object
    implements MarshallerProvider

`UnmarshallerProvider` implementation which use a `ThreadLocal` to store references to `Marshaller` instances. This may give you some performance boost if you need to marshall many small `Object`'s and your actual Thread count is not to big

### Constructor Summary

Constructors
Constructor and Description
`ThreadLocalMarshallerProvider(org.jboss.marshalling.MarshallerFactory factory, org.jboss.marshalling.MarshallingConfiguration config)` Create a new instance of the `ThreadLocalMarshallerProvider`

### Method Summary

Methods
`org.jboss.marshalling.Marshaller` `getMarshaller(ChannelHandlerContext ctx)` Get a `Marshaller` for the given `ChannelHandlerContext`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ThreadLocalMarshallerProvider

    public ThreadLocalMarshallerProvider(org.jboss.marshalling.MarshallerFactory factory,
                                 org.jboss.marshalling.MarshallingConfiguration config)

Create a new instance of the `ThreadLocalMarshallerProvider`

Parameters:
  `factory` - the `MarshallerFactory` to use to create `Marshaller`'s if needed
  `config` - the `MarshallingConfiguration` to use

### Method Detail

#### getMarshaller

    public org.jboss.marshalling.Marshaller getMarshaller(ChannelHandlerContext ctx)
                                                   throws Exception

Description copied from interface: `MarshallerProvider`
Get a `Marshaller` for the given `ChannelHandlerContext`

Specified by:
  `getMarshaller` in interface `MarshallerProvider`
Throws:
  `Exception`