KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > tomcat50 > session > SessionResponse50


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.tc.tomcat50.session;
5
6 import org.apache.catalina.Connector;
7 import org.apache.catalina.Context;
8 import org.apache.catalina.HttpResponse;
9 import org.apache.catalina.Request;
10 import org.apache.coyote.tomcat5.CoyoteResponse;
11
12 import com.terracotta.session.SessionResponse;
13
14 import java.io.IOException JavaDoc;
15 import java.io.OutputStream JavaDoc;
16 import java.io.PrintWriter JavaDoc;
17
18 import javax.servlet.ServletOutputStream JavaDoc;
19 import javax.servlet.ServletResponse JavaDoc;
20 import javax.servlet.http.Cookie JavaDoc;
21
22 public class SessionResponse50 extends SessionResponse implements HttpResponse {
23
24   private final CoyoteResponse valveRes;
25   private final SessionRequest50 sessReq;
26
27   public SessionResponse50(final CoyoteResponse valveRes, final SessionRequest50 sessReq) {
28     super(sessReq, valveRes);
29     this.valveRes = valveRes;
30     this.sessReq = sessReq;
31   }
32
33   public Request getRequest() {
34     return sessReq;
35   }
36
37   public ServletResponse JavaDoc getResponse() {
38     return this;
39   }
40
41   // /////////////////////////////////////////////
42
// the rest is just delegates...
43
public ServletOutputStream JavaDoc createOutputStream() throws IOException JavaDoc {
44     return valveRes.createOutputStream();
45   }
46
47   public void finishResponse() throws IOException JavaDoc {
48     valveRes.finishResponse();
49   }
50
51   public Connector getConnector() {
52     return valveRes.getConnector();
53   }
54
55   public int getContentCount() {
56     return valveRes.getContentCount();
57   }
58
59   public int getContentLength() {
60     return valveRes.getContentLength();
61   }
62
63   public Context getContext() {
64     return valveRes.getContext();
65   }
66
67   public Cookie JavaDoc[] getCookies() {
68     return valveRes.getCookies();
69   }
70
71   public String JavaDoc getHeader(String JavaDoc s) {
72     return valveRes.getHeader(s);
73   }
74
75   public String JavaDoc[] getHeaderNames() {
76     return valveRes.getHeaderNames();
77   }
78
79   public String JavaDoc[] getHeaderValues(String JavaDoc s) {
80     return valveRes.getHeaderValues(s);
81   }
82
83   public boolean getIncluded() {
84     return valveRes.getIncluded();
85   }
86
87   public String JavaDoc getInfo() {
88     return valveRes.getInfo();
89   }
90
91   public String JavaDoc getMessage() {
92     return valveRes.getMessage();
93   }
94
95   public PrintWriter JavaDoc getReporter() throws IOException JavaDoc {
96     return valveRes.getReporter();
97   }
98
99   public int getStatus() {
100     return valveRes.getStatus();
101   }
102
103   public OutputStream JavaDoc getStream() {
104     return valveRes.getStream();
105   }
106
107   public boolean isAppCommitted() {
108     return valveRes.isAppCommitted();
109   }
110
111   public boolean isError() {
112     return valveRes.isError();
113   }
114
115   public boolean isSuspended() {
116     return valveRes.isSuspended();
117   }
118
119   public void recycle() {
120     valveRes.recycle();
121   }
122
123   public void reset(int i, String JavaDoc s) {
124     valveRes.reset(i, s);
125   }
126
127   public void sendAcknowledgement() throws IOException JavaDoc {
128     valveRes.sendAcknowledgement();
129   }
130
131   public void setAppCommitted(boolean flag) {
132     valveRes.setAppCommitted(flag);
133   }
134
135   public void setConnector(Connector connector) {
136     valveRes.setConnector(connector);
137   }
138
139   public void setContext(Context context) {
140     valveRes.setContext(context);
141   }
142
143   public void setError() {
144     valveRes.setError();
145   }
146
147   public void setRequest(Request request) {
148     valveRes.setRequest(request);
149   }
150
151   public void setStream(OutputStream JavaDoc outputstream) {
152     valveRes.setStream(outputstream);
153   }
154
155   public void setSuspended(boolean flag) {
156     valveRes.setSuspended(flag);
157   }
158
159   public String JavaDoc toString() {
160     return valveRes.toString();
161   }
162
163   public void setIncluded(boolean flag) {
164     valveRes.setIncluded(flag);
165   }
166
167 }
168
Popular Tags