org.tinygroup.weblayer.webcontext.session.encode
类 AbstractSerializationEncoder
java.lang.Object
org.tinygroup.support.BeanSupport
org.tinygroup.weblayer.webcontext.session.encode.AbstractSerializationEncoder
- 所有已实现的接口:
- org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, SessionEncoder
- 直接已知子类:
- SerializationEncoder
public abstract class AbstractSerializationEncoder
- extends BeanSupport
- implements SessionEncoder
通过Serializer提供的序列化机制来编码对象,以及解码字符串。
编码步骤为:
- 用
Serializer序列化,默认使用HessianSerializer。
- 压缩。
- 如果
Encrypter存在,用它加密,否则,不加密。
- Base64编码。
- URL encoding,以确保所有字符都符合HTTP header的要求。
解码步骤相反。
- 作者:
- renhui
| 从类 org.tinygroup.support.BeanSupport 继承的方法 |
afterPropertiesSet, assertInitialized, destroy, dispose, getBeanDescription, getBeanDescription, getBeanInterface, getBeanName, isInitialized, postDispose, postInit, preDispose, preInit, resolveBeanInterface, setBeanName |
serializer
protected Serializer serializer
encrypter
protected Encrypter encrypter
AbstractSerializationEncoder
public AbstractSerializationEncoder()
init
protected void init()
throws Exception
- 覆盖:
- 类
BeanSupport 中的 init
- 抛出:
Exception
encode
public String encode(Map<String,Object> attrs,
SessionStore.StoreContext storeContext)
throws SessionEncoderException
- 编码。
- 指定者:
- 接口
SessionEncoder 中的 encode
- 抛出:
SessionEncoderException - 如果编码失败
decode
public Map<String,Object> decode(String encodedValue,
SessionStore.StoreContext storeContext)
throws SessionEncoderException
- 解码。
- 指定者:
- 接口
SessionEncoder 中的 decode
- 抛出:
SessionEncoderException - 如果解码失败
toString
public String toString()
- 覆盖:
- 类
BeanSupport 中的 toString
Copyright © 2006–2014 开源组织. All rights reserved.