Example #1
0
File: Proxy.cpp Project: lmtoo/ice
bool
IceProxy::Ice::Object::___end_ice_invoke(pair<const Byte*, const Byte*>& outEncaps, const AsyncResultPtr& __result)
{
    AsyncResult::__check(__result, this, ice_invoke_name);
    bool ok = __result->__wait();
    if(_reference->getMode() == Reference::ModeTwoway)
    {
        Int sz;
        __result->__readParamEncaps(outEncaps.first, sz);
        outEncaps.second = outEncaps.first + sz;
    }
    return ok;
}
Example #2
0
File: Proxy.cpp Project: lmtoo/ice
bool
IceProxy::Ice::Object::end_ice_invoke(vector<Byte>& outEncaps, const AsyncResultPtr& __result)
{
    AsyncResult::__check(__result, this, ice_invoke_name);
    bool ok = __result->__wait();
    if(_reference->getMode() == Reference::ModeTwoway)
    {
        const Byte* v;
        Int sz;
        __result->__readParamEncaps(v, sz);
        vector<Byte>(v, v + sz).swap(outEncaps);
    }
    return ok;
}
Example #3
0
File: Proxy.cpp Project: lmtoo/ice
ConnectionPtr
IceProxy::Ice::Object::end_ice_getConnection(const AsyncResultPtr& __result)
{
    AsyncResult::__check(__result, this, ice_getConnection_name);
    __result->__wait();
    return ice_getCachedConnection();
}
Example #4
0
        virtual void sent(const AsyncResultPtr& result) const
        {
            try
            {
                AsyncResult::__check(result, _communicator.get(), __flushBatchRequests_name);
                result->__wait();
            }
            catch(const ::Ice::Exception&)
            {
                _exception(current_exception());
            }

            if(_sent)
            {
                _sent(result->sentSynchronously());
            }
        }
Example #5
0
void
AsyncResult::__check(const AsyncResultPtr& r, const Ice::Connection* con, const string& operation)
{
    __check(r, operation);
    if(r->getConnection().get() != con)
    {
        throw IceUtil::IllegalArgumentException(__FILE__, __LINE__, "Connection for call to end_" + operation +
                                                " does not match connection that was used to call corresponding " +
                                                "begin_" + operation + " method");
    }
}
Example #6
0
void
AsyncResult::__check(const AsyncResultPtr& r, const IceProxy::Ice::Object* prx, const string& operation)
{
    __check(r, operation);
    if(r->getProxy().get() != prx)
    {
        throw IceUtil::IllegalArgumentException(__FILE__, __LINE__, "Proxy for call to end_" + operation +
                                                " does not match proxy that was used to call corresponding begin_" +
                                                operation + " method");
    }
}
Example #7
0
File: Proxy.cpp Project: lmtoo/ice
string
IceProxy::Ice::Object::end_ice_id(const AsyncResultPtr& __result)
{
    AsyncResult::__check(__result, this, ice_id_name);
    bool __ok = __result->__wait();
    if(!__ok)
    {
        try
        {
            __result->__throwUserException();
        }
        catch(const UserException& __ex)
        {
            throw UnknownUserException(__FILE__, __LINE__, __ex.ice_id());
        }
    }
    string __ret;
    ::Ice::InputStream* __is = __result->__startReadParams();
    __is->read(__ret);
    __result->__endReadParams();
    return __ret;
}
Example #8
0
void
Ice::CommunicatorI::end_flushBatchRequests(const AsyncResultPtr& r)
{
    AsyncResult::__check(r, this, __flushBatchRequests_name);
    r->__wait();
}
Example #9
0
File: Proxy.cpp Project: lmtoo/ice
void
IceProxy::Ice::Object::end_ice_flushBatchRequests(const AsyncResultPtr& result)
{
    AsyncResult::__check(result, this, ice_flushBatchRequests_name);
    result->__wait();
}