001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017: package org.apache.jetspeed.engine.servlet;
018:
019: import java.util.Enumeration;
020:
021: import javax.servlet.ServletContext;
022: import javax.servlet.http.HttpSession;
023:
024: /**
025: * @author Scott T Weaver
026: *
027: */
028: public class HttpSessionWrapper implements HttpSession {
029: private HttpSession session;
030:
031: public HttpSessionWrapper(HttpSession session) {
032: this .session = session;
033: }
034:
035: /* (non-Javadoc)
036: * @see java.lang.Object#equals(java.lang.Object)
037: */
038: public boolean equals(Object obj) {
039: return session.equals(obj);
040: }
041:
042: /**
043: * @param arg0
044: * @return
045: */
046: public Object getAttribute(String arg0) {
047: return session.getAttribute(arg0);
048: }
049:
050: /**
051: * @return
052: */
053: public Enumeration getAttributeNames() {
054: return session.getAttributeNames();
055: }
056:
057: /**
058: * @return
059: */
060: public long getCreationTime() {
061: return session.getCreationTime();
062: }
063:
064: /**
065: * @return
066: */
067: public String getId() {
068: return session.getId();
069: }
070:
071: /**
072: * @return
073: */
074: public long getLastAccessedTime() {
075: return session.getLastAccessedTime();
076: }
077:
078: /**
079: * @return
080: */
081: public int getMaxInactiveInterval() {
082: return session.getMaxInactiveInterval();
083: }
084:
085: /**
086: * @return
087: */
088: public ServletContext getServletContext() {
089: return session.getServletContext();
090: }
091:
092: /**
093: * @deprecated As of Java(tm) Servlet API 2.1
094: * for security reasons, with no replacement.
095: * @return
096: */
097: public javax.servlet.http.HttpSessionContext getSessionContext() {
098: return session.getSessionContext();
099: }
100:
101: /**
102: * @deprecated @see javax.servlet.http.HttpSession#getValue(String)
103: * @param arg0
104: * @return
105: */
106: public Object getValue(String arg0) {
107: return session.getValue(arg0);
108: }
109:
110: /**
111: * @deprecated @see javax.servlet.http.HttpSession#getValueNames(String)
112: * @return
113: */
114: public String[] getValueNames() {
115: return session.getValueNames();
116: }
117:
118: /* (non-Javadoc)
119: * @see java.lang.Object#hashCode()
120: */
121: public int hashCode() {
122: return session.hashCode();
123: }
124:
125: /**
126: *
127: */
128: public void invalidate() {
129: session.invalidate();
130: }
131:
132: /**
133: * @return
134: */
135: public boolean isNew() {
136: return session.isNew();
137: }
138:
139: /**
140: * @deprecated @see javax.servlet.http.HttpSession#putValue(String,Object)
141: * @param arg0
142: * @param arg1
143: */
144: public void putValue(String arg0, Object arg1) {
145: session.putValue(arg0, arg1);
146: }
147:
148: /**
149: * @param arg0
150: */
151: public void removeAttribute(String arg0) {
152: session.removeAttribute(arg0);
153: }
154:
155: /**
156: * @deprecated @see javax.servlet.http.HttpSession#removeValue(String)
157: * @param arg0
158: */
159: public void removeValue(String arg0) {
160: session.removeValue(arg0);
161: }
162:
163: /**
164: * @param arg0
165: * @param arg1
166: */
167: public void setAttribute(String arg0, Object arg1) {
168: session.setAttribute(arg0, arg1);
169: }
170:
171: /**
172: * @param arg0
173: */
174: public void setMaxInactiveInterval(int arg0) {
175: session.setMaxInactiveInterval(arg0);
176: }
177:
178: /* (non-Javadoc)
179: * @see java.lang.Object#toString()
180: */
181: public String toString() {
182: return session.toString();
183: }
184: }
|