KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > celtix > bindings > ClientBinding


1 package org.objectweb.celtix.bindings;
2
3 import java.io.IOException JavaDoc;
4 import java.util.concurrent.Executor JavaDoc;
5 import java.util.concurrent.Future JavaDoc;
6
7 import org.objectweb.celtix.context.ObjectMessageContext;
8
9
10 /**
11  * Provides methods for invoking operations on an endpoint.
12  * @author dkulp
13  *
14  */

15 public interface ClientBinding extends BindingBase {
16
17     /**
18      * Makes a one way request using the contents of the <code>ObjectMessageContext</code>.
19      * @param context Holds the method and parameters for the request.
20      * @param callback Callback object to handle the IO of the objects in the context
21      * @throws IOException
22      */

23     void invokeOneWay(ObjectMessageContext context, DataBindingCallback callback)
24         throws IOException JavaDoc;
25
26     /**
27      * Makes a synchronous request and returns the context containing the response.
28      * @param context Holds the method and parameters for the request.
29      * @param callback Callback object to handle the IO of the objects in the context
30      * @return ObjectMessageContext containing the request response.
31      * @throws IOException
32      */

33     ObjectMessageContext invoke(ObjectMessageContext context, DataBindingCallback callback)
34         throws IOException JavaDoc;
35
36     /**
37      * Makes an asynchronous request using the contents of the <code>ObjectMessageContext</code>.
38      * @param context Holds the method and parameters for the request.
39      * @param callback Callback object to handle the IO of the objects in the context
40      * @return Future for accessing the result of the request.
41      * @throws IOException
42      */

43     Future JavaDoc<ObjectMessageContext> invokeAsync(ObjectMessageContext context,
44                                        DataBindingCallback callback,
45                                        Executor JavaDoc executor)
46         throws IOException JavaDoc;
47     
48     /**
49      * Create a response callback for dispatch and correlation of decoupled
50      * responses.
51      * Called by an associated ClientTransport instance when it determines
52      * that a new decoupled response endpoint is required (if a preexisting
53      * decoupled response endpoint is available, then the response correlator
54      * associated with that is used instead).
55      *
56      * @return a new ResponseCallback
57      */

58     ResponseCallback createResponseCallback();
59 }
60
Popular Tags