public abstract class AbstractSessionValueEncoder extends BeanSupport implements SessionValueEncoder
SessionEncoder针对非串行化场景的抽象编码实现,加密,base64来编码、解码。| Constructor and Description |
|---|
AbstractSessionValueEncoder() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
convertToString(Class<?> type,
Object value,
org.springframework.beans.TypeConverter converter) |
protected Object |
convertToType(Class<?> type,
String encodedValue,
org.springframework.beans.TypeConverter converter) |
Object |
decode(String encodedValue,
SessionStore.StoreContext storeContext)
将字符串解码成对象。
|
protected abstract Object |
decodeValue(String encodedValue) |
protected abstract boolean |
doCompress() |
protected abstract boolean |
doURLEncode() |
String |
encode(Object value,
SessionStore.StoreContext storeContext)
将对象编码成字符串。
|
protected abstract String |
encodeValue(Object value) |
String |
getCharset() |
protected org.springframework.beans.TypeConverter |
getTypeConverter() |
void |
setCharset(String charset) |
void |
setEncrypter(Encrypter encrypter) |
afterPropertiesSet, assertInitialized, destroy, dispose, getBeanDescription, getBeanDescription, getBeanInterface, getBeanName, init, isInitialized, postDispose, postInit, preDispose, preInit, resolveBeanInterface, setBeanName, toStringprotected Encrypter encrypter
public void setEncrypter(Encrypter encrypter)
public String getCharset()
public void setCharset(String charset)
protected abstract boolean doURLEncode()
protected abstract boolean doCompress()
public String encode(Object value, SessionStore.StoreContext storeContext) throws SessionValueEncoderException
SessionValueEncoderencode in interface SessionValueEncoderSessionValueEncoderException - 如果编码失败public Object decode(String encodedValue, SessionStore.StoreContext storeContext) throws SessionValueEncoderException
SessionValueEncoderdecode in interface SessionValueEncoderSessionValueEncoderException - 如果解码失败protected final org.springframework.beans.TypeConverter getTypeConverter()
protected final String convertToString(Class<?> type, Object value, org.springframework.beans.TypeConverter converter)
protected final Object convertToType(Class<?> type, String encodedValue, org.springframework.beans.TypeConverter converter)
Copyright © 2006–2018 TinyGroup. All rights reserved.