Beispiel #1
0
void
NodeI::Update::completed(const Ice::AsyncResultPtr& result)
{
    try
    {
        result->throwLocalException();
        finished(true);
    }
    catch(const Ice::LocalException&)
    {
        finished(false);
    }
}
Beispiel #2
0
void
Subscriber::completed(const Ice::AsyncResultPtr& result)
{
    try
    {
        result->throwLocalException();

        IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(_lock);

        // Decrement the _outstanding count.
        --_outstanding;
        assert(_outstanding >= 0 && _outstanding < _maxOutstanding);
        if(_observer)
        {
            _observer->delivered(_outstandingCount);
        }
        
        //
        // A successful response means we're no longer retrying, we're
        // back active.
        //
        _currentRetry = 0;
        
        if(_events.empty() && _outstanding == 0 && _shutdown)
        {
            _lock.notify();
        }
        else
        {
            flush();
        }
    }
    catch(const Ice::LocalException& ex)
    {
        error(true, ex);
    }
}