001: /*
002: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
003: */
004: package com.tc.tomcat50.session;
005:
006: import org.apache.catalina.Connector;
007: import org.apache.catalina.Context;
008: import org.apache.catalina.HttpResponse;
009: import org.apache.catalina.Request;
010: import org.apache.coyote.tomcat5.CoyoteResponse;
011:
012: import com.terracotta.session.SessionResponse;
013:
014: import java.io.IOException;
015: import java.io.OutputStream;
016: import java.io.PrintWriter;
017:
018: import javax.servlet.ServletOutputStream;
019: import javax.servlet.ServletResponse;
020: import javax.servlet.http.Cookie;
021:
022: public class SessionResponse50 extends SessionResponse implements
023: HttpResponse {
024:
025: private final CoyoteResponse valveRes;
026: private final SessionRequest50 sessReq;
027:
028: public SessionResponse50(final CoyoteResponse valveRes,
029: final SessionRequest50 sessReq) {
030: super (sessReq, valveRes);
031: this .valveRes = valveRes;
032: this .sessReq = sessReq;
033: }
034:
035: public Request getRequest() {
036: return sessReq;
037: }
038:
039: public ServletResponse getResponse() {
040: return this ;
041: }
042:
043: // /////////////////////////////////////////////
044: // the rest is just delegates...
045: public ServletOutputStream createOutputStream() throws IOException {
046: return valveRes.createOutputStream();
047: }
048:
049: public void finishResponse() throws IOException {
050: valveRes.finishResponse();
051: }
052:
053: public Connector getConnector() {
054: return valveRes.getConnector();
055: }
056:
057: public int getContentCount() {
058: return valveRes.getContentCount();
059: }
060:
061: public int getContentLength() {
062: return valveRes.getContentLength();
063: }
064:
065: public Context getContext() {
066: return valveRes.getContext();
067: }
068:
069: public Cookie[] getCookies() {
070: return valveRes.getCookies();
071: }
072:
073: public String getHeader(String s) {
074: return valveRes.getHeader(s);
075: }
076:
077: public String[] getHeaderNames() {
078: return valveRes.getHeaderNames();
079: }
080:
081: public String[] getHeaderValues(String s) {
082: return valveRes.getHeaderValues(s);
083: }
084:
085: public boolean getIncluded() {
086: return valveRes.getIncluded();
087: }
088:
089: public String getInfo() {
090: return valveRes.getInfo();
091: }
092:
093: public String getMessage() {
094: return valveRes.getMessage();
095: }
096:
097: public PrintWriter getReporter() throws IOException {
098: return valveRes.getReporter();
099: }
100:
101: public int getStatus() {
102: return valveRes.getStatus();
103: }
104:
105: public OutputStream getStream() {
106: return valveRes.getStream();
107: }
108:
109: public boolean isAppCommitted() {
110: return valveRes.isAppCommitted();
111: }
112:
113: public boolean isError() {
114: return valveRes.isError();
115: }
116:
117: public boolean isSuspended() {
118: return valveRes.isSuspended();
119: }
120:
121: public void recycle() {
122: valveRes.recycle();
123: }
124:
125: public void reset(int i, String s) {
126: valveRes.reset(i, s);
127: }
128:
129: public void sendAcknowledgement() throws IOException {
130: valveRes.sendAcknowledgement();
131: }
132:
133: public void setAppCommitted(boolean flag) {
134: valveRes.setAppCommitted(flag);
135: }
136:
137: public void setConnector(Connector connector) {
138: valveRes.setConnector(connector);
139: }
140:
141: public void setContext(Context context) {
142: valveRes.setContext(context);
143: }
144:
145: public void setError() {
146: valveRes.setError();
147: }
148:
149: public void setRequest(Request request) {
150: valveRes.setRequest(request);
151: }
152:
153: public void setStream(OutputStream outputstream) {
154: valveRes.setStream(outputstream);
155: }
156:
157: public void setSuspended(boolean flag) {
158: valveRes.setSuspended(flag);
159: }
160:
161: public String toString() {
162: return valveRes.toString();
163: }
164:
165: public void setIncluded(boolean flag) {
166: valveRes.setIncluded(flag);
167: }
168:
169: }
|