📄 butorsession.java
字号:
/* * Copyright (C) butor.com. All rights reserved. * * This software is published under the terms of the GNU Library General * Public License (GNU LGPL), a copy of which has been included with this * distribution in the LICENSE.txt file. */package org.butor.web.helper;import java.util.Enumeration;import javax.servlet.ServletContext;import javax.servlet.http.HttpSession;import javax.servlet.http.HttpSessionContext;/** * This class implements the Wrapper or Decorator pattern. Methods default to * calling through to the wrapped session object. * * @see javax.servlet.http.HttpServletRequest * @author nacroaz */public class ButorSession implements HttpSession { protected HttpSession f_session; public ButorSession(HttpSession session) { f_session = session; } /** * @see HttpSession#getCreationTime() */ public long getCreationTime() { return f_session.getCreationTime(); } /** * @see HttpSession#getId() */ public String getId() { return f_session.getId(); } /** * @see HttpSession#getLastAccessedTime() */ public long getLastAccessedTime() { return f_session.getLastAccessedTime(); } /** * @see HttpSession#getServletContext() */ public ServletContext getServletContext() { return f_session.getServletContext(); } /** * @see HttpSession#setMaxInactiveInterval(int) */ public void setMaxInactiveInterval(int arg0) { f_session.setMaxInactiveInterval(arg0); } /** * @see HttpSession#getMaxInactiveInterval() */ public int getMaxInactiveInterval() { return f_session.getMaxInactiveInterval(); } /* * @see HttpSession#getSessionContext() * @deprecated * public HttpSessionContext getSessionContext() { return f_session.getSessionContext(); } */ /** * @see HttpSession#getAttribute(String) */ public Object getAttribute(String arg0) { return f_session.getAttribute(arg0); } /* * @see HttpSession#getValue(String) * @deprecated * public Object getValue(String arg0) { return f_session.getValue(arg0); } */ /** * @see HttpSession#getAttributeNames() */ public Enumeration getAttributeNames() { return f_session.getAttributeNames(); } /* * @see HttpSession#getValueNames() * @deprecated * public String[] getValueNames() { return f_session.getValueNames(); } */ /** * @see HttpSession#setAttribute(String, Object) */ public void setAttribute(String arg0, Object arg1) { f_session.setAttribute(arg0, arg1); } /* * @see HttpSession#putValue(String, Object) * @deprecated * public void putValue(String arg0, Object arg1) { f_session.putValue(arg0, arg1); } */ /** * @see HttpSession#removeAttribute(String) */ public void removeAttribute(String arg0) { f_session.removeAttribute(arg0); } /* * @see HttpSession#removeValue(String) * @deprecated * public void removeValue(String arg0) { f_session.removeValue(arg0); }*/ /** * @see HttpSession#invalidate() */ public void invalidate() { f_session.invalidate(); } /** * @see HttpSession#isNew() */ public boolean isNew() { return f_session.isNew(); } /** * @see HttpSession#getSessionContext() * @deprecated */ public HttpSessionContext getSessionContext() { return null; } /** * @see HttpSession#getValue(String) * @deprecated */ public Object getValue(String arg0) { return null; } /** * @see HttpSession#getValueNames() * @deprecated */ public String[] getValueNames() { return null; } /** * @see HttpSession#putValue(String, Object) * @deprecated */ public void putValue(String arg0, Object arg1) { } /** * @see HttpSession#removeValue(String) * @deprecated */ public void removeValue(String arg0) { }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -