001: /*
002: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
003: */
004: package com.tc.tomcat50.session;
005:
006: import org.apache.catalina.Connector;
007: import org.apache.catalina.Context;
008: import org.apache.catalina.Host;
009: import org.apache.catalina.HttpRequest;
010: import org.apache.catalina.Response;
011: import org.apache.catalina.ValveContext;
012: import org.apache.catalina.Wrapper;
013: import org.apache.coyote.tomcat5.CoyoteRequest;
014: import org.apache.coyote.tomcat5.CoyoteResponse;
015: import org.apache.tomcat.util.buf.MessageBytes;
016:
017: import com.terracotta.session.SessionId;
018: import com.terracotta.session.SessionManager;
019: import com.terracotta.session.SessionRequest;
020:
021: import java.io.IOException;
022: import java.io.InputStream;
023: import java.net.Socket;
024: import java.security.Principal;
025: import java.util.Iterator;
026: import java.util.Locale;
027:
028: import javax.servlet.FilterChain;
029: import javax.servlet.ServletInputStream;
030: import javax.servlet.ServletRequest;
031: import javax.servlet.http.Cookie;
032:
033: public class SessionRequest50 extends SessionRequest implements
034: HttpRequest {
035:
036: private final CoyoteRequest req;
037: private SessionResponse50 sessRes50;
038:
039: public SessionRequest50(SessionId requestedSessionId,
040: CoyoteRequest req, CoyoteResponse res,
041: SessionManager manager) {
042: super (requestedSessionId, req, res, manager);
043: this .req = req;
044: }
045:
046: public ServletRequest getRequest() {
047: return this ;
048: }
049:
050: public void setSessionResposne50(SessionResponse50 sessRes50) {
051: this .sessRes50 = sessRes50;
052: }
053:
054: public Response getResponse() {
055: return sessRes50;
056: }
057:
058: // ///////////////////////////////////////////////
059: // the rest is just delegates...
060: public void addCookie(Cookie cookie) {
061: req.addCookie(cookie);
062: }
063:
064: public void addHeader(String s, String s1) {
065: req.addHeader(s, s1);
066: }
067:
068: public void addLocale(Locale locale) {
069: req.addLocale(locale);
070: }
071:
072: public void addParameter(String s, String[] as) {
073: req.addParameter(s, as);
074: }
075:
076: public void clearCookies() {
077: req.clearCookies();
078: }
079:
080: public void clearHeaders() {
081: req.clearHeaders();
082: }
083:
084: public void clearLocales() {
085: req.clearLocales();
086: }
087:
088: public void clearParameters() {
089: req.clearParameters();
090: }
091:
092: public ServletInputStream createInputStream() throws IOException {
093: return req.createInputStream();
094: }
095:
096: public void finishRequest() throws IOException {
097: req.finishRequest();
098: }
099:
100: public String getAuthorization() {
101: return req.getAuthorization();
102: }
103:
104: public Connector getConnector() {
105: return req.getConnector();
106: }
107:
108: public Context getContext() {
109: return req.getContext();
110: }
111:
112: public MessageBytes getContextPathMB() {
113: return req.getContextPathMB();
114: }
115:
116: public String getDecodedRequestURI() {
117: return req.getDecodedRequestURI();
118: }
119:
120: public MessageBytes getDecodedRequestURIMB() {
121: return req.getDecodedRequestURIMB();
122: }
123:
124: public FilterChain getFilterChain() {
125: return req.getFilterChain();
126: }
127:
128: public Host getHost() {
129: return req.getHost();
130: }
131:
132: public String getInfo() {
133: return req.getInfo();
134: }
135:
136: public Object getNote(String s) {
137: return req.getNote(s);
138: }
139:
140: public Iterator getNoteNames() {
141: return req.getNoteNames();
142: }
143:
144: public MessageBytes getPathInfoMB() {
145: return req.getPathInfoMB();
146: }
147:
148: public MessageBytes getRequestPathMB() {
149: return req.getRequestPathMB();
150: }
151:
152: public MessageBytes getServletPathMB() {
153: return req.getServletPathMB();
154: }
155:
156: public Socket getSocket() {
157: return req.getSocket();
158: }
159:
160: public InputStream getStream() {
161: return req.getStream();
162: }
163:
164: public ValveContext getValveContext() {
165: return req.getValveContext();
166: }
167:
168: public Wrapper getWrapper() {
169: return req.getWrapper();
170: }
171:
172: public void recycle() {
173: req.recycle();
174: }
175:
176: public void removeNote(String s) {
177: req.removeNote(s);
178: }
179:
180: public void setAuthorization(String s) {
181: req.setAuthorization(s);
182: }
183:
184: public void setAuthType(String s) {
185: req.setAuthType(s);
186: }
187:
188: public void setConnector(Connector connector) {
189: req.setConnector(connector);
190: }
191:
192: public void setContentLength(int i) {
193: req.setContentLength(i);
194: }
195:
196: public void setContentType(String s) {
197: req.setContentType(s);
198: }
199:
200: public void setContext(Context context) {
201: req.setContext(context);
202: }
203:
204: public void setContextPath(String s) {
205: req.setContextPath(s);
206: }
207:
208: public void setDecodedRequestURI(String s) {
209: req.setDecodedRequestURI(s);
210: }
211:
212: public void setFilterChain(FilterChain filterchain) {
213: req.setFilterChain(filterchain);
214: }
215:
216: public void setHost(Host host) {
217: req.setHost(host);
218: }
219:
220: public void setMethod(String s) {
221: req.setMethod(s);
222: }
223:
224: public void setNote(String s, Object obj) {
225: req.setNote(s, obj);
226: }
227:
228: public void setPathInfo(String s) {
229: req.setPathInfo(s);
230: }
231:
232: public void setProtocol(String s) {
233: req.setProtocol(s);
234: }
235:
236: public void setQueryString(String s) {
237: req.setQueryString(s);
238: }
239:
240: public void setRemoteAddr(String s) {
241: req.setRemoteAddr(s);
242: }
243:
244: public void setRequestedSessionCookie(boolean flag) {
245: req.setRequestedSessionCookie(flag);
246: }
247:
248: public void setRequestedSessionId(String s) {
249: req.setRequestedSessionId(s);
250: }
251:
252: public void setRequestedSessionURL(boolean flag) {
253: req.setRequestedSessionURL(flag);
254: }
255:
256: public void setRequestURI(String s) {
257: req.setRequestURI(s);
258: }
259:
260: public void setResponse(Response response) {
261: req.setResponse(response);
262: }
263:
264: public void setScheme(String s) {
265: req.setScheme(s);
266: }
267:
268: public void setSecure(boolean flag) {
269: req.setSecure(flag);
270: }
271:
272: public void setServerName(String s) {
273: req.setServerName(s);
274: }
275:
276: public void setServerPort(int i) {
277: req.setServerPort(i);
278: }
279:
280: public void setServletPath(String s) {
281: req.setServletPath(s);
282: }
283:
284: public void setSocket(Socket socket) {
285: req.setSocket(socket);
286: }
287:
288: public void setStream(InputStream inputstream) {
289: req.setStream(inputstream);
290: }
291:
292: public void setUserPrincipal(Principal principal) {
293: req.setUserPrincipal(principal);
294: }
295:
296: public void setValveContext(ValveContext valvecontext) {
297: req.setValveContext(valvecontext);
298: }
299:
300: public void setWrapper(Wrapper wrapper) {
301: req.setWrapper(wrapper);
302: }
303:
304: }
|