KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > terracotta > session > SessionResponse


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.terracotta.session;
5
6 import com.terracotta.session.util.Assert;
7
8 import javax.servlet.http.HttpServletResponse JavaDoc;
9 import javax.servlet.http.HttpServletResponseWrapper JavaDoc;
10
11 public class SessionResponse extends HttpServletResponseWrapper JavaDoc implements TerracottaResponse {
12
13   private final TerracottaRequest req;
14
15   public SessionResponse(TerracottaRequest req, HttpServletResponse JavaDoc res) {
16     super(res);
17     Assert.pre(req != null);
18     Assert.pre(res != null);
19
20     this.req = req;
21   }
22
23   public String JavaDoc encodeRedirectUrl(String JavaDoc url) {
24     return encodeRedirectURL(url);
25   }
26
27   public String JavaDoc encodeUrl(String JavaDoc url) {
28     return encodeURL(url);
29   }
30
31   public String JavaDoc encodeRedirectURL(final String JavaDoc url) {
32     return req.encodeRedirectURL(url);
33   }
34
35   public String JavaDoc encodeURL(final String JavaDoc url) {
36     return req.encodeURL(url);
37   }
38 }
39
Popular Tags