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