예제 #1
0
void
IceGrid::AdminCallbackRouter::ice_invoke_async(const AMD_Object_ice_invokePtr& cb, 
                                               const pair<const Byte*, const Byte*>& inParams,
                                               const Current& current)
{
    ConnectionPtr con;

    {
        IceUtil::Mutex::Lock sync(_mutex);
        map<string, ConnectionPtr>::iterator p = _categoryToConnection.find(current.id.category);
        if(p == _categoryToConnection.end())
        {
            throw ObjectNotExistException(__FILE__, __LINE__);
        }
        con = p->second;
    }

  
    ObjectPrx target = con->createProxy(current.id)->ice_facet(current.facet);
    
        
    //
    // Call with AMI
    //
    target->begin_ice_invoke(current.operation, current.mode, inParams, current.ctx, 
                             newCallback_Object_ice_invoke(this, 
                                                           &AdminCallbackRouter::invokeResponse, 
                                                           &AdminCallbackRouter::invokeException),
                             cb);
}
예제 #2
0
void
IceGrid::AdminRouter::ice_invoke_async(const AMD_Object_ice_invokePtr& cb, 
                                       const pair<const Byte*, const Byte*>& inParams,
                                       const Current& current)
{
    ObjectPrx target = getTarget(current);
    assert(target != 0);

    //
    // Call with AMI
    //
    Callback_Object_ice_invokePtr amiCb = 
        newCallback_Object_ice_invoke(new CallbackI(cb), &CallbackI::response, &CallbackI::exception);

    target->begin_ice_invoke(current.operation, current.mode, inParams, current.ctx, amiCb);
}