01: package org.objectweb.celtix.context;
02:
03: import java.io.InputStream;
04: import java.io.OutputStream;
05:
06: import javax.xml.ws.handler.MessageContext;
07:
08: /**
09: * A MessageContext that provide access to the underlying streams
10: * involved in a message exchange
11: */
12: public interface StreamMessageContext extends MessageContext {
13:
14: /**
15: * Get the underlying InputStream from which the incoming message
16: * can be read
17: *
18: * @return the InputStream or null if there is no InputStream
19: * available (for example on the outbound leg of a message
20: * exchange.
21: */
22: InputStream getInputStream();
23:
24: /**
25: * Set the InputStream to read the message from. Can be used to
26: * replace the InputStream from which the message is read. This
27: * can be used to carry out some sort of transformation on the
28: * data before it is sent over the network.
29: *
30: */
31: void setInputStream(InputStream in);
32:
33: /**
34: * Get the underlying OutputStream from which the outgoing message
35: * can be read
36: *
37: * @return the OutputStream or null if there is no OutputStream
38: * available (for example on the inbound leg of a message
39: * exchange.
40: */
41: OutputStream getOutputStream();
42:
43: /**
44: * Set the OutputStream to write the message to. Can be used to
45: * replace the OutputStream to which the message is writetn. This
46: * can be used to carry out some sort of transformation on the
47: * data as it is being read from the network.
48: *
49: */
50: void setOutputStream(OutputStream in);
51: }
|