diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2014-09-19 11:24:12 -0230 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2014-09-19 11:24:12 -0230 |
commit | f684ea538bec2af9e3c10c93b3ae0341a0689ef0 (patch) | |
tree | de62e0ea13269c0ddfd4222b2f6433aaa8d77904 /cpp/src/Ice/RetryQueue.cpp | |
parent | adding collocated version of Python ami test (diff) | |
download | ice-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/RetryQueue.cpp')
-rw-r--r-- | cpp/src/Ice/RetryQueue.cpp | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/cpp/src/Ice/RetryQueue.cpp b/cpp/src/Ice/RetryQueue.cpp index e10c09b1396..730b15ba73d 100644 --- a/cpp/src/Ice/RetryQueue.cpp +++ b/cpp/src/Ice/RetryQueue.cpp @@ -18,7 +18,7 @@ using namespace IceInternal; IceUtil::Shared* IceInternal::upCast(RetryQueue* p) { return p; } -IceInternal::RetryTask::RetryTask(const RetryQueuePtr& queue, const OutgoingAsyncPtr& outAsync) : +IceInternal::RetryTask::RetryTask(const RetryQueuePtr& queue, const OutgoingAsyncMessageCallbackPtr& outAsync) : _queue(queue), _outAsync(outAsync) { } @@ -28,21 +28,14 @@ IceInternal::RetryTask::runTimerTask() { if(_queue->remove(this)) { - try - { - _outAsync->__invoke(false); - } - catch(const Ice::LocalException& ex) - { - _outAsync->__invokeExceptionAsync(ex); - } + _outAsync->__processRetry(false); } } void IceInternal::RetryTask::destroy() { - _outAsync->__invokeExceptionAsync(CommunicatorDestroyedException(__FILE__, __LINE__)); + _outAsync->__processRetry(true); } bool @@ -56,7 +49,7 @@ IceInternal::RetryQueue::RetryQueue(const InstancePtr& instance) : _instance(ins } void -IceInternal::RetryQueue::add(const OutgoingAsyncPtr& out, int interval) +IceInternal::RetryQueue::add(const OutgoingAsyncMessageCallbackPtr& out, int interval) { Lock sync(*this); RetryTaskPtr task = new RetryTask(this, out); @@ -66,7 +59,7 @@ IceInternal::RetryQueue::add(const OutgoingAsyncPtr& out, int interval) } catch(const IceUtil::IllegalArgumentException&) // Expected if the communicator destroyed the timer. { - throw CommunicatorDestroyedException(__FILE__, __LINE__); + throw CommunicatorDestroyedException(__FILE__, __LINE__); } _requests.insert(task); } |