| 1 package org.objectweb.celtix.bus.transports.http; 2 3 import java.io.IOException ; 4 import java.io.InputStream ; 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 HTTP_REQUEST = 14 HTTPServerInputStreamContext.class.getName() + ".REQUEST"; 15 public static final String HTTP_RESPONSE = 16 HTTPServerInputStreamContext.class.getName() + ".RESPONSE"; 17 18 private static final long serialVersionUID = 1L; 19 20 protected final AbstractHTTPServerTransport transport; 21 protected InputStream origInputStream; 22 protected InputStream inStream; 23 24 public HTTPServerInputStreamContext(AbstractHTTPServerTransport tr) 25 throws IOException { 26 transport = tr; 27 } 28 29 public void initContext() throws IOException { 30 transport.setHeaders(this); 31 inStream = origInputStream; 32 } 33 34 public InputStream getInputStream() { 35 return inStream; 36 } 37 38 public void setInputStream(InputStream ins) { 39 inStream = ins; 40 } 41 42 public void setFault(boolean isFault) { 43 } 45 46 public boolean isFault() { 47 return false; 48 } 49 } | Popular Tags |