01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.terracotta.session;
05:
06: import com.terracotta.session.util.Assert;
07:
08: import javax.servlet.http.HttpServletResponse;
09: import javax.servlet.http.HttpServletResponseWrapper;
10:
11: public class SessionResponse extends HttpServletResponseWrapper
12: implements TerracottaResponse {
13:
14: private final TerracottaRequest req;
15:
16: public SessionResponse(TerracottaRequest req,
17: HttpServletResponse res) {
18: super (res);
19: Assert.pre(req != null);
20: Assert.pre(res != null);
21:
22: this .req = req;
23: }
24:
25: public String encodeRedirectUrl(String url) {
26: return encodeRedirectURL(url);
27: }
28:
29: public String encodeUrl(String url) {
30: return encodeURL(url);
31: }
32:
33: public String encodeRedirectURL(final String url) {
34: return req.encodeRedirectURL(url);
35: }
36:
37: public String encodeURL(final String url) {
38: return req.encodeURL(url);
39: }
40: }
|