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

字段摘要
protected  Encrypter encrypter
           
 
构造方法摘要
AbstractSessionValueEncoder()
           
 
方法摘要
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)
           
 
从类 org.tinygroup.support.BeanSupport 继承的方法
afterPropertiesSet, assertInitialized, destroy, dispose, getBeanDescription, getBeanDescription, getBeanInterface, getBeanName, init, isInitialized, postDispose, postInit, preDispose, preInit, resolveBeanInterface, setBeanName, toString
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

字段详细信息

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.