KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > celtix > transports > ClientTransport


1 package org.objectweb.celtix.transports;
2
3
4
5 import java.io.IOException JavaDoc;
6 import java.util.concurrent.Executor JavaDoc;
7 import java.util.concurrent.Future JavaDoc;
8
9 import javax.wsdl.Port;
10
11 import org.objectweb.celtix.bindings.ResponseCallback;
12 import org.objectweb.celtix.context.InputStreamMessageContext;
13 import org.objectweb.celtix.context.OutputStreamMessageContext;
14 import org.objectweb.celtix.ws.addressing.EndpointReferenceType;
15
16 /**
17  * ClientTransport
18  * @author dkulp
19  *
20  */

21 public interface ClientTransport extends Transport {
22
23     /**
24      * Get target endpoint.
25      *
26      * @return EPR for target endpoint
27      * @throws IOException if there is an error creating the endpoint.
28      */

29     EndpointReferenceType getTargetEndpoint();
30     
31     /**
32      * Get decoupled endpoint.
33      *
34      * @return EPR for decoupled endpoint
35      * @throws IOException if there is an error creating the endpoint.
36      */

37     EndpointReferenceType getDecoupledEndpoint() throws IOException JavaDoc;
38     
39     /**
40      * Get WSDL port.
41      *
42      * @return WSDL port
43      */

44     Port getPort();
45     
46     /**
47      * invoke on a oneway operation on a remote service.
48      * @param context
49      */

50     void invokeOneway(OutputStreamMessageContext context) throws IOException JavaDoc;
51
52     /**
53      * Invoke on a two-way operation on the remote service. The transport
54      * should provide a context that returns a valid InputStream containing
55      * the response in one of two ways:
56      * <ol>
57      * <li>if tightly coupled, via the return value of this method
58      * <li>if decoupled, via the <code>ResponseCallback</code>
59      * </ol>
60      * @param context containg in the request
61      * @return context containing resonse if tightly coupled, null otherwise
62      */

63     InputStreamMessageContext invoke(OutputStreamMessageContext context)
64         throws IOException JavaDoc;
65
66     /**
67      * invoke on a two-way operation on the remote service asyncronously.
68      *
69      * @param context
70      * @return the context containing the InputStream response payload
71      */

72     Future JavaDoc<InputStreamMessageContext> invokeAsync(OutputStreamMessageContext context, Executor JavaDoc executor)
73         throws IOException JavaDoc;
74     
75     /**
76      * Retrieve the ResponseCallback used to dispatch decoupled responses.
77      * This may be either a new ResponseCallback created via the ClientBinding
78      * or a preexisting instance, if the decoupled response endpoint is
79      * being reused.
80      *
81      * @return a ResponseCallback instance
82      */

83     ResponseCallback getResponseCallback();
84 }
85
Popular Tags