01: package org.mortbay.cometd;
02:
03: import java.io.IOException;
04: import java.util.List;
05: import java.util.Map;
06:
07: import javax.servlet.http.HttpServletRequest;
08: import javax.servlet.http.HttpServletResponse;
09:
10: public abstract class AbstractTransport implements Transport {
11: private HttpServletResponse _response;
12: private boolean _polling;
13:
14: public void setResponse(HttpServletResponse response)
15: throws IOException {
16: _response = response;
17: }
18:
19: public HttpServletResponse getResponse() {
20: return _response;
21: }
22:
23: public void preample(HttpServletResponse resp, Map reply)
24: throws IOException {
25: // TODO REMOVE ME
26: }
27:
28: public boolean isPolling() {
29: return _polling;
30: }
31:
32: public void setPolling(boolean polling) {
33: _polling = polling;
34: }
35:
36: public void send(List replies) throws IOException {
37: if (replies != null) {
38: for (int i = 0; i < replies.size(); i++)
39: send((Map) replies.get(i));
40: }
41: }
42:
43: }
|