public class SessionModelEncoderImpl extends Object implements SessionModelEncoder
SessionModelEncoder
的默认实现:将model内容保存成字符串。Constructor and Description |
---|
SessionModelEncoderImpl() |
Modifier and Type | Method and Description |
---|---|
SessionModel |
decode(Object data,
SessionModel.Factory factory)
将store中取得的数据转换成session model。
|
Object |
encode(SessionModel model)
将session model转换成store中可存储的对象。
|
public Object encode(SessionModel model)
SessionModelEncoder
encode
in interface SessionModelEncoder
public SessionModel decode(Object data, SessionModel.Factory factory)
SessionModelEncoder
如果返回null
,则数据格式不支持。框架将会尝试用其余的SessionModelEncoder
来解码。
decode
in interface SessionModelEncoder
Copyright © 2006–2018 TinyGroup. All rights reserved.