public class ThreadLocalUnmarshallerProvider extends java.lang.Object implements UnmarshallerProvider
UnmarshallerProvider实现,它使用ThreadLocal来存储对Unmarshaller实例的引用。
如果你需要解组许多小的Object这可能会给你一些性能提升。
| Constructor and Description |
|---|
ThreadLocalUnmarshallerProvider(org.jboss.marshalling.MarshallerFactory factory, org.jboss.marshalling.MarshallingConfiguration config)
创建一个 ThreadLocalUnmarshallerProvider的新实例
|
| Modifier and Type | Method and Description |
|---|---|
org.jboss.marshalling.Unmarshaller |
getUnmarshaller(ChannelHandlerContext ctx)
获得 Unmarshaller的Unmarshaller
|
public ThreadLocalUnmarshallerProvider(org.jboss.marshalling.MarshallerFactory factory,
org.jboss.marshalling.MarshallingConfiguration config)
ThreadLocalUnmarshallerProvider的新实例
factory -
MarshallerFactory用于根据需要创建
Unmarshaller的
config - 使用
MarshallingConfiguration
public org.jboss.marshalling.Unmarshaller getUnmarshaller(ChannelHandlerContext ctx) throws java.lang.Exception
UnmarshallerProvider
Unmarshaller对于给定ChannelHandlerContext
getUnmarshaller在界面
UnmarshallerProvider
java.lang.Exception
Copyright © 2008–2018 The Netty Project. All rights reserved.