summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/OutgoingAsync.cpp
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2014-09-19 11:24:12 -0230
committerDwayne Boone <dwayne@zeroc.com>2014-09-19 11:24:12 -0230
commitf684ea538bec2af9e3c10c93b3ae0341a0689ef0 (patch)
treede62e0ea13269c0ddfd4222b2f6433aaa8d77904 /cpp/src/Ice/OutgoingAsync.cpp
parentadding collocated version of Python ami test (diff)
downloadice-f684ea538bec2af9e3c10c93b3ae0341a0689ef0.tar.bz2
ice-f684ea538bec2af9e3c10c93b3ae0341a0689ef0.tar.xz
ice-f684ea538bec2af9e3c10c93b3ae0341a0689ef0.zip
ICE-5661 some changes to class structure for OutgoingAsync
Diffstat (limited to 'cpp/src/Ice/OutgoingAsync.cpp')
-rw-r--r--cpp/src/Ice/OutgoingAsync.cpp54
1 files changed, 51 insertions, 3 deletions
diff --git a/cpp/src/Ice/OutgoingAsync.cpp b/cpp/src/Ice/OutgoingAsync.cpp
index cd3442113f8..c03cdd5a441 100644
--- a/cpp/src/Ice/OutgoingAsync.cpp
+++ b/cpp/src/Ice/OutgoingAsync.cpp
@@ -618,6 +618,26 @@ IceInternal::OutgoingAsync::__finished(const Ice::Exception& exc)
}
void
+IceInternal::OutgoingAsync::__processRetry(bool destroyed)
+{
+ if(destroyed)
+ {
+ __invokeExceptionAsync(CommunicatorDestroyedException(__FILE__, __LINE__));
+ }
+ else
+ {
+ try
+ {
+ __invoke(false);
+ }
+ catch(const Ice::LocalException& ex)
+ {
+ __invokeExceptionAsync(ex);
+ }
+ }
+}
+
+void
IceInternal::OutgoingAsync::__invokeExceptionAsync(const Ice::Exception& ex)
{
if((_state & Done) == 0 && _handler)
@@ -986,6 +1006,12 @@ IceInternal::BatchOutgoingAsync::__finished(const Ice::Exception& exc)
__invokeException(exc);
}
+void
+IceInternal::BatchOutgoingAsync::__processRetry(bool destroyed)
+{
+ // Does not support retry
+}
+
IceInternal::ProxyBatchOutgoingAsync::ProxyBatchOutgoingAsync(const Ice::ObjectPrx& proxy,
const std::string& operation,
const CallbackBasePtr& delegate,
@@ -1208,13 +1234,15 @@ IceInternal::CommunicatorBatchOutgoingAsync::check(bool userThread)
}
}
-IceInternal::GetConnectionOutgoingAsync::GetConnectionOutgoingAsync(const Ice::ObjectPrx& proxy,
+IceInternal::GetConnectionOutgoingAsync::GetConnectionOutgoingAsync(const Ice::ObjectPrx& prx,
const std::string& operation,
const CallbackBasePtr& delegate,
const Ice::LocalObjectPtr& cookie) :
- OutgoingAsync(proxy, operation, delegate, cookie)
+ AsyncResult(prx->ice_getCommunicator(), prx->__reference()->getInstance(), operation, delegate, cookie),
+ _proxy(prx),
+ _cnt(0)
{
- _observer.attach(proxy.get(), operation, 0);
+ _observer.attach(prx.get(), operation, 0);
}
void
@@ -1285,6 +1313,26 @@ IceInternal::GetConnectionOutgoingAsync::__finished(const Ice::Exception& exc)
}
void
+IceInternal::GetConnectionOutgoingAsync::__processRetry(bool destroyed)
+{
+ if(destroyed)
+ {
+ __invokeExceptionAsync(CommunicatorDestroyedException(__FILE__, __LINE__));
+ }
+ else
+ {
+ try
+ {
+ __invoke();
+ }
+ catch(const Ice::LocalException& ex)
+ {
+ __invokeExceptionAsync(ex);
+ }
+ }
+}
+
+void
IceInternal::GetConnectionOutgoingAsync::handleException(const Ice::Exception& exc)
{
try