org.tinygroup.weblayer.webcontext.session.impl
public abstract class AbstractSessionAttributeAccessController extends Object implements SessionAttributeInterceptor
| Constructor and 描述 |
|---|
AbstractSessionAttributeAccessController() |
| Modifier and Type | Method and 描述 |
|---|---|
protected abstract boolean |
allowForAttribute(String name,
Class<?> type) |
void |
init(SessionConfig sessionConfig) |
Object |
onRead(String name,
Object value)
从session中取得数据后,方法被调用。
|
Object |
onWrite(String name,
Object value)
将值设置到session中之前,方法被调用。
|
protected abstract Object |
readInvalidAttribute(String name,
Object value) |
protected abstract Object |
writeInvalidAttribute(String name,
Object value) |
public void init(SessionConfig sessionConfig)
init 接口 {1} 中的 {0} SessionInterceptorpublic final Object onRead(String name, Object value)
SessionAttributeInterceptor方法可以修改数据,并将修改后的值返回给调用者。
onRead 接口 {1} 中的 {0} SessionAttributeInterceptorpublic final Object onWrite(String name, Object value)
SessionAttributeInterceptor方法返回的值,将被设置到session中。
值为null表示将要从session中删除该条数据。
假如方法抛出异常,那么没有任何值会被设入session中。
onWrite 接口 {1} 中的 {0} SessionAttributeInterceptorCopyright © 2006–2015 TinyGroup. All rights reserved.