01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright
03: * notice. All rights reserved.
04: */
05: package org.apache.catalina.connector;
06:
07: import com.tc.object.util.OverrideCheck;
08: import com.terracotta.session.SessionResponse;
09:
10: // NOTE: A class adapter adds methods that delegate all override'able methods of tomcat's
11: // Response class to the "valveRes" instance
12: public class SessionResponse55 extends Response {
13: static {
14: OverrideCheck.check(Response.class, SessionResponse55.class);
15: }
16:
17: private final Response valveRes;
18: private final SessionRequest55 sessReq;
19: private final SessionResponse sessRes;
20:
21: public SessionResponse55(Response valveRes,
22: SessionRequest55 sessReq, SessionResponse sessRes) {
23: this .valveRes = valveRes;
24: this .sessRes = sessRes;
25: this .sessReq = sessReq;
26:
27: // silence compiler warning
28: if (false && this .valveRes != this .valveRes) {
29: throw new AssertionError();
30: }
31: }
32:
33: public String encodeRedirectUrl(String url) {
34: return sessRes.encodeRedirectUrl(url);
35: }
36:
37: public String encodeRedirectURL(String url) {
38: return sessRes.encodeRedirectUrl(url);
39: }
40:
41: public String encodeUrl(String url) {
42: return sessRes.encodeUrl(url);
43: }
44:
45: public String encodeURL(String url) {
46: return sessRes.encodeURL(url);
47: }
48:
49: public Request getRequest() {
50: return this .sessReq;
51: }
52:
53: public javax.servlet.http.HttpServletResponse getResponse() {
54: return this.sessRes;
55: }
56:
57: }
|