KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > celtix > bus > transports > http > HTTPServerInputStreamContext


1 package org.objectweb.celtix.bus.transports.http;
2
3 import java.io.IOException JavaDoc;
4 import java.io.InputStream JavaDoc;
5
6 import org.objectweb.celtix.context.GenericMessageContext;
7 import org.objectweb.celtix.context.InputStreamMessageContext;
8
9 public class HTTPServerInputStreamContext
10     extends GenericMessageContext
11     implements InputStreamMessageContext {
12
13     public static final String JavaDoc HTTP_REQUEST =
14         HTTPServerInputStreamContext.class.getName() + ".REQUEST";
15     public static final String JavaDoc HTTP_RESPONSE =
16         HTTPServerInputStreamContext.class.getName() + ".RESPONSE";
17     
18     private static final long serialVersionUID = 1L;
19
20     protected final AbstractHTTPServerTransport transport;
21     protected InputStream JavaDoc origInputStream;
22     protected InputStream JavaDoc inStream;
23
24     public HTTPServerInputStreamContext(AbstractHTTPServerTransport tr)
25         throws IOException JavaDoc {
26         transport = tr;
27     }
28
29     public void initContext() throws IOException JavaDoc {
30         transport.setHeaders(this);
31         inStream = origInputStream;
32     }
33     
34     public InputStream JavaDoc getInputStream() {
35         return inStream;
36     }
37
38     public void setInputStream(InputStream JavaDoc ins) {
39         inStream = ins;
40     }
41
42     public void setFault(boolean isFault) {
43         //nothing to do
44
}
45
46     public boolean isFault() {
47         return false;
48     }
49 }
Popular Tags