1 package org.objectweb.celtix.bus.transports.jms; 2 3 import java.io.ByteArrayOutputStream ; 4 import java.io.IOException ; 5 import java.io.OutputStream ; 6 7 import javax.xml.ws.handler.MessageContext; 8 9 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 14 extends MessageContextWrapper 15 implements OutputStreamMessageContext { 16 OutputStream os; 17 18 public JMSOutputStreamContext(MessageContext ctx) { 19 super(ctx); 20 } 21 22 23 public OutputStream getOutputStream() { 24 if (os == null) { 26 os = new ByteArrayOutputStream (); 27 } 28 return os; 29 } 30 31 public void setOutputStream(OutputStream out) { 32 os = out; 34 } 35 36 public void setFault(boolean isFault) { 37 39 } 40 41 public boolean isFault() { 42 return false; 44 } 45 46 public void setOneWay(boolean isOneWay) { 47 put(ONEWAY_MESSAGE_TF, isOneWay); 48 } 49 50 public boolean isOneWay() { 51 return ((Boolean )get(ONEWAY_MESSAGE_TF)).booleanValue(); 52 } 53 54 public InputStreamMessageContext getCorrespondingInputStreamContext() 55 throws IOException { 56 return null; 57 } 58 59 } 60 | Popular Tags |