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.