summaryrefslogtreecommitdiff
path: root/java/src/IceInternal/ProxyBatchOutgoingAsync.java
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2014-05-23 11:59:44 +0200
committerBenoit Foucher <benoit@zeroc.com>2014-05-23 11:59:44 +0200
commitd81701ca8182942b7936f9fd84a019b695e9c890 (patch)
treedc036c9d701fbbe1afad67782bd78572c0f61974 /java/src/IceInternal/ProxyBatchOutgoingAsync.java
parentFixed bug ICE-5543: stringToIdentity bug with escaped escapes (diff)
downloadice-d81701ca8182942b7936f9fd84a019b695e9c890.tar.bz2
ice-d81701ca8182942b7936f9fd84a019b695e9c890.tar.xz
ice-d81701ca8182942b7936f9fd84a019b695e9c890.zip
Added support for invocation timeouts and ACM heartbeats
Diffstat (limited to 'java/src/IceInternal/ProxyBatchOutgoingAsync.java')
-rw-r--r--java/src/IceInternal/ProxyBatchOutgoingAsync.java30
1 files changed, 27 insertions, 3 deletions
diff --git a/java/src/IceInternal/ProxyBatchOutgoingAsync.java b/java/src/IceInternal/ProxyBatchOutgoingAsync.java
index f6a6c676a9f..8bea231573d 100644
--- a/java/src/IceInternal/ProxyBatchOutgoingAsync.java
+++ b/java/src/IceInternal/ProxyBatchOutgoingAsync.java
@@ -19,7 +19,7 @@ public class ProxyBatchOutgoingAsync extends BatchOutgoingAsync
_observer = ObserverHelper.get(prx, operation);
}
- public void __send()
+ public void __invoke()
{
Protocol.checkSupportedProtocol(_proxy.__reference().getProtocol());
@@ -32,13 +32,37 @@ public class ProxyBatchOutgoingAsync extends BatchOutgoingAsync
try
{
delegate = _proxy.__getDelegate(false);
- int status = delegate.__getRequestHandler().flushAsyncBatchRequests(this);
+ RequestHandler handler = delegate.__getRequestHandler();
+ int status;
+ try
+ {
+ status = handler.sendAsyncRequest(this);
+ }
+ catch(IceInternal.LocalExceptionWrapper ex)
+ {
+ throw ex.get();
+ }
if((status & AsyncStatus.Sent) > 0)
{
_sentSynchronously = true;
if((status & AsyncStatus.InvokeSentCallback) > 0)
{
- __sent();
+ __invokeSent();
+ }
+ }
+ else
+ {
+ synchronized(_monitor)
+ {
+ if((_state & Done) == 0)
+ {
+ int invocationTimeout = handler.getReference().getInvocationTimeout();
+ if(invocationTimeout > 0)
+ {
+ _instance.timer().schedule(this, invocationTimeout);
+ _timeoutRequestHandler = handler;
+ }
+ }
}
}
}