EntityHttpServletRequest.java 文件源码

java
阅读 27 收藏 0 点赞 0 评论 0

项目:sakai 作者:
/**
 * Serialize the attributes of this session into an object that can
 * be turned into a byte array with standard Java serialization.
 * @return a representation of this session's serialized state
 */
public Serializable serializeState() {
    HashMap<String, Object> state = new HashMap<String, Object>();
    for (Iterator it = this.attributes.entrySet().iterator(); it.hasNext();) {
        Map.Entry entry = (Map.Entry) it.next();
        String name = (String) entry.getKey();
        Object value = entry.getValue();
        it.remove();
        if (value instanceof Serializable) {
            state.put(name, value);
        }
        else {
            if (value instanceof HttpSessionBindingListener) {
                ((HttpSessionBindingListener) value).valueUnbound(new HttpSessionBindingEvent(this, name, value));
            }
        }
    }
    return state;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号