KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > celtix > context > StreamMessageContext


1 package org.objectweb.celtix.context;
2
3 import java.io.InputStream JavaDoc;
4 import java.io.OutputStream JavaDoc;
5
6 import javax.xml.ws.handler.MessageContext;
7
8 /**
9  * 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 JavaDoc getInputStream();
23
24     
25     /**
26      * Set the InputStream to read the message from. Can be used to
27      * replace the InputStream from which the message is read. This
28      * can be used to carry out some sort of transformation on the
29      * data before it is sent over the network.
30      *
31      */

32     void setInputStream(InputStream JavaDoc in);
33
34     /**
35      * Get the underlying OutputStream from which the outgoing message
36      * can be read
37      *
38      * @return the OutputStream or null if there is no OutputStream
39      * available (for example on the inbound leg of a message
40      * exchange.
41      */

42     OutputStream JavaDoc getOutputStream();
43
44     /**
45      * Set the OutputStream to write the message to. Can be used to
46      * replace the OutputStream to which the message is writetn. This
47      * can be used to carry out some sort of transformation on the
48      * data as it is being read from the network.
49      *
50      */

51     void setOutputStream(OutputStream JavaDoc in);
52 }
53
Popular Tags