org.tinygroup.weblayer.webcontext.session.valueencode
类 AbstractSessionValueEncoder
java.lang.Object
org.tinygroup.support.BeanSupport
org.tinygroup.weblayer.webcontext.session.valueencode.AbstractSessionValueEncoder
- 所有已实现的接口:
- org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, SessionValueEncoder
- 直接已知子类:
- MappedValuesEncoder, SimpleValueEncoder
public abstract class AbstractSessionValueEncoder
- extends BeanSupport
- implements SessionValueEncoder
SessionEncoder针对非串行化场景的抽象编码实现,加密,base64来编码、解码。
- 作者:
- youqun.zhangyq, Michael Zhou
| 从类 org.tinygroup.support.BeanSupport 继承的方法 |
afterPropertiesSet, assertInitialized, destroy, dispose, getBeanDescription, getBeanDescription, getBeanInterface, getBeanName, init, isInitialized, postDispose, postInit, preDispose, preInit, resolveBeanInterface, setBeanName, toString |
encrypter
protected Encrypter encrypter
AbstractSessionValueEncoder
public AbstractSessionValueEncoder()
setEncrypter
public void setEncrypter(Encrypter encrypter)
getCharset
public String getCharset()
setCharset
public void setCharset(String charset)
doURLEncode
protected abstract boolean doURLEncode()
doCompress
protected abstract boolean doCompress()
encode
public String encode(Object value,
SessionStore.StoreContext storeContext)
throws SessionValueEncoderException
- 从接口
SessionValueEncoder 复制的描述
- 将对象编码成字符串。
- 指定者:
- 接口
SessionValueEncoder 中的 encode
- 抛出:
SessionValueEncoderException - 如果编码失败
decode
public Object decode(String encodedValue,
SessionStore.StoreContext storeContext)
throws SessionValueEncoderException
- 从接口
SessionValueEncoder 复制的描述
- 将字符串解码成对象。
- 指定者:
- 接口
SessionValueEncoder 中的 decode
- 抛出:
SessionValueEncoderException - 如果解码失败
getTypeConverter
protected final org.springframework.beans.TypeConverter getTypeConverter()
convertToString
protected final String convertToString(Class<?> type,
Object value,
org.springframework.beans.TypeConverter converter)
convertToType
protected final Object convertToType(Class<?> type,
String encodedValue,
org.springframework.beans.TypeConverter converter)
encodeValue
protected abstract String encodeValue(Object value)
throws Exception
- 抛出:
Exception
decodeValue
protected abstract Object decodeValue(String encodedValue)
throws Exception
- 抛出:
Exception
Copyright © 2006–2013 开源组织. All rights reserved.