01: package com.icesoft.faces.webapp.http.common;
02:
03: import java.io.IOException;
04: import java.io.InputStream;
05: import java.io.OutputStream;
06: import java.net.URI;
07: import java.util.Date;
08:
09: public class RequestProxy implements Request {
10: protected Request request;
11:
12: public RequestProxy(Request request) {
13: this .request = request;
14: }
15:
16: public String getMethod() {
17: return request.getMethod();
18: }
19:
20: public URI getURI() {
21: return request.getURI();
22: }
23:
24: public String getHeader(String name) {
25: return request.getHeader(name);
26: }
27:
28: public String[] getHeaderAsStrings(String name) {
29: return request.getHeaderAsStrings(name);
30: }
31:
32: public Date getHeaderAsDate(String name) {
33: return request.getHeaderAsDate(name);
34: }
35:
36: public int getHeaderAsInteger(String name) {
37: return request.getHeaderAsInteger(name);
38: }
39:
40: public boolean containsParameter(String name) {
41: return request.containsParameter(name);
42: }
43:
44: public String getParameter(String name) {
45: return request.getParameter(name);
46: }
47:
48: public String[] getParameterAsStrings(String name) {
49: return request.getParameterAsStrings(name);
50: }
51:
52: public int getParameterAsInteger(String name) {
53: return request.getParameterAsInteger(name);
54: }
55:
56: public boolean getParameterAsBoolean(String name) {
57: return request.getParameterAsBoolean(name);
58: }
59:
60: public String getParameter(String name, String defaultValue) {
61: return request.getParameter(name, defaultValue);
62: }
63:
64: public int getParameterAsInteger(String name, int defaultValue) {
65: return request.getParameterAsInteger(name, defaultValue);
66: }
67:
68: public boolean getParameterAsBoolean(String name,
69: boolean defaultValue) {
70: return request.getParameterAsBoolean(name, defaultValue);
71: }
72:
73: public InputStream readBody() throws IOException {
74: return request.readBody();
75: }
76:
77: public void readBodyInto(OutputStream out) throws IOException {
78: request.readBodyInto(out);
79: }
80:
81: public void respondWith(ResponseHandler handler) throws Exception {
82: request.respondWith(handler);
83: }
84:
85: public void detectEnvironment(Environment environment)
86: throws Exception {
87: request.detectEnvironment(environment);
88: }
89: }
|