summaryrefslogtreecommitdiff
path: root/java/src/Ice/CommunicatorI.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/Ice/CommunicatorI.java')
-rw-r--r--java/src/Ice/CommunicatorI.java55
1 files changed, 54 insertions, 1 deletions
diff --git a/java/src/Ice/CommunicatorI.java b/java/src/Ice/CommunicatorI.java
index 38568febdaa..5dd57ea5c00 100644
--- a/java/src/Ice/CommunicatorI.java
+++ b/java/src/Ice/CommunicatorI.java
@@ -178,7 +178,60 @@ public final class CommunicatorI implements Communicator
public void
flushBatchRequests()
{
- _instance.flushBatchRequests();
+ AsyncResult r = begin_flushBatchRequests();
+ end_flushBatchRequests(r);
+ }
+
+ public AsyncResult
+ begin_flushBatchRequests()
+ {
+ return begin_flushBatchRequestsInternal(null);
+ }
+
+ public AsyncResult
+ begin_flushBatchRequests(Callback cb)
+ {
+ return begin_flushBatchRequestsInternal(cb);
+ }
+
+ public AsyncResult
+ begin_flushBatchRequests(Callback_Communicator_flushBatchRequests cb)
+ {
+ return begin_flushBatchRequestsInternal(cb);
+ }
+
+ private static final String __flushBatchRequests_name = "flushBatchRequests";
+
+ private Ice.AsyncResult
+ begin_flushBatchRequestsInternal(IceInternal.CallbackBase cb)
+ {
+ IceInternal.OutgoingConnectionFactory connectionFactory = _instance.outgoingConnectionFactory();
+ IceInternal.ObjectAdapterFactory adapterFactory = _instance.objectAdapterFactory();
+
+ //
+ // This callback object receives the results of all invocations
+ // of Connection.begin_flushBatchRequests.
+ //
+ IceInternal.CommunicatorBatchOutgoingAsync result =
+ new IceInternal.CommunicatorBatchOutgoingAsync(this, _instance, __flushBatchRequests_name, cb);
+
+ connectionFactory.flushAsyncBatchRequests(result);
+ adapterFactory.flushAsyncBatchRequests(result);
+
+ //
+ // Inform the callback that we have finished initiating all of the
+ // flush requests.
+ //
+ result.ready();
+
+ return result;
+ }
+
+ public void
+ end_flushBatchRequests(AsyncResult r)
+ {
+ AsyncResult.__check(r, this, __flushBatchRequests_name);
+ r.__wait();
}
public ObjectPrx