📄 dummyhttpsession.java
字号:
package com.wiley.compBooks.EJwithUML.Base.TestUtilities;import javax.servlet.http.*;import javax.servlet.*;import java.util.*;import java.io.*;public class DummyHttpSession implements HttpSession{ private Hashtable attributes = new Hashtable(); // configuration methods// HttpSession methodspublic Object getAttribute(String name){ return this.attributes.get(name);}public Enumeration getAttributeNames(){ return this.attributes.keys();}public long getCreationTime(){ return 1L;}public String getId(){ return null;}public long getLastAccessedTime(){ return 1L;}public int getMaxInactiveInterval(){ return 1;}public ServletContext getServletContext(){ return null;}public HttpSessionContext getSessionContext(){ return null;}public Object getValue(String name){ return this.attributes.get(name);}public String[] getValueNames(){ return null;}public void invalidate(){}public boolean isNew(){ return false;}public void putValue(String name, Object value){ this.attributes.put(name, value);}public void removeAttribute(String name){ this.attributes.remove(name);}public void removeValue(String name){ this.attributes.remove(name);}public void setAttribute(String name, Object value){ this.attributes.put(name, value);}public void setMaxInactiveInterval(int interval){}}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -