01: package org.objectweb.celtix.bus.transports.jms;
02:
03: import java.io.ByteArrayOutputStream;
04: import java.io.IOException;
05: import java.io.OutputStream;
06:
07: import javax.xml.ws.handler.MessageContext;
08:
09: import org.objectweb.celtix.context.InputStreamMessageContext;
10: import org.objectweb.celtix.context.MessageContextWrapper;
11: import org.objectweb.celtix.context.OutputStreamMessageContext;
12:
13: public class JMSOutputStreamContext extends MessageContextWrapper
14: implements OutputStreamMessageContext {
15: OutputStream os;
16:
17: public JMSOutputStreamContext(MessageContext ctx) {
18: super (ctx);
19: }
20:
21: public OutputStream getOutputStream() {
22: // TODO Auto-generated method stub
23: if (os == null) {
24: os = new ByteArrayOutputStream();
25: }
26: return os;
27: }
28:
29: public void setOutputStream(OutputStream out) {
30: // TODO Auto-generated method stub
31: os = out;
32: }
33:
34: public void setFault(boolean isFault) {
35: // TODO Auto-generated method stub
36:
37: }
38:
39: public boolean isFault() {
40: // TODO Auto-generated method stub
41: return false;
42: }
43:
44: public void setOneWay(boolean isOneWay) {
45: put(ONEWAY_MESSAGE_TF, isOneWay);
46: }
47:
48: public boolean isOneWay() {
49: return ((Boolean) get(ONEWAY_MESSAGE_TF)).booleanValue();
50: }
51:
52: public InputStreamMessageContext getCorrespondingInputStreamContext()
53: throws IOException {
54: return null;
55: }
56:
57: }
|