View Javadoc

1   //
2   //  ========================================================================
3   //  Copyright (c) 1995-2016 Mort Bay Consulting Pty. Ltd.
4   //  ------------------------------------------------------------------------
5   //  All rights reserved. This program and the accompanying materials
6   //  are made available under the terms of the Eclipse Public License v1.0
7   //  and Apache License v2.0 which accompanies this distribution.
8   //
9   //      The Eclipse Public License is available at
10  //      http://www.eclipse.org/legal/epl-v10.html
11  //
12  //      The Apache License v2.0 is available at
13  //      http://www.opensource.org/licenses/apache2.0.php
14  //
15  //  You may elect to redistribute this code under either of these licenses.
16  //  ========================================================================
17  //
18  
19  package org.eclipse.jetty.server;
20  
21  import java.io.IOException;
22  import java.util.Collection;
23  
24  import javax.servlet.ServletResponse;
25  import javax.servlet.ServletResponseWrapper;
26  import javax.servlet.http.Cookie;
27  import javax.servlet.http.HttpServletResponse;
28  
29  
30  /* ------------------------------------------------------------ */
31  /** 
32   * ServletResponseHttpWrapper
33   * 
34   * Wrapper to tunnel a ServletResponse via a HttpServletResponse
35   */
36  public class ServletResponseHttpWrapper extends ServletResponseWrapper implements HttpServletResponse
37  {
38      public ServletResponseHttpWrapper(ServletResponse response)
39      {
40          super(response);
41      }
42  
43      public void addCookie(Cookie cookie)
44      {
45      }
46  
47      public boolean containsHeader(String name)
48      {
49          return false;
50      }
51  
52      public String encodeURL(String url)
53      {
54          return null;
55      }
56  
57      public String encodeRedirectURL(String url)
58      {
59          return null;
60      }
61  
62      public String encodeUrl(String url)
63      {
64          return null;
65      }
66  
67      public String encodeRedirectUrl(String url)
68      {
69          return null;
70      }
71  
72      public void sendError(int sc, String msg) throws IOException
73      {
74      }
75  
76      public void sendError(int sc) throws IOException
77      {
78      }
79  
80      public void sendRedirect(String location) throws IOException
81      {
82      }
83  
84      public void setDateHeader(String name, long date)
85      {
86      }
87  
88      public void addDateHeader(String name, long date)
89      {
90      }
91  
92      public void setHeader(String name, String value)
93      {
94      }
95  
96      public void addHeader(String name, String value)
97      {
98      }
99  
100     public void setIntHeader(String name, int value)
101     {
102     }
103 
104     public void addIntHeader(String name, int value)
105     {
106     }
107 
108     public void setStatus(int sc)
109     {
110     }
111 
112     public void setStatus(int sc, String sm)
113     {
114     }
115 
116     /**
117      * @see javax.servlet.http.HttpServletResponse#getHeader(java.lang.String)
118      */
119     public String getHeader(String name)
120     {
121         return null;
122     }
123 
124     /**
125      * @see javax.servlet.http.HttpServletResponse#getHeaderNames()
126      */
127     public Collection<String> getHeaderNames()
128     {
129         return null;
130     }
131 
132     /**
133      * @see javax.servlet.http.HttpServletResponse#getHeaders(java.lang.String)
134      */
135     public Collection<String> getHeaders(String name)
136     {
137         return null;
138     }
139 
140     /**
141      * @see javax.servlet.http.HttpServletResponse#getStatus()
142      */
143     public int getStatus()
144     {
145         return 0;
146     }
147 
148 }