Beispiel #1
0
void
ServerLocator::findAdapterById_async(const Ice::AMD_Locator_findAdapterByIdPtr& response, const string& id, 
                                     const Ice::Current& current) const
{
    ++const_cast<int&>(_requestCount);
    response->ice_response(_registry->getAdapter(id));
}
Beispiel #2
0
 virtual void
 findAdapterById_async(const Ice::AMD_Locator_findAdapterByIdPtr& amdCB,
                       const string&,
                       const Ice::Current&) const
 {
     amdCB->ice_response(0);
 }
Beispiel #3
0
void
ServerLocator::findAdapterById_async(const Ice::AMD_Locator_findAdapterByIdPtr& response, const string& id,
                                     const Ice::Current& current) const
{
    ++const_cast<int&>(_requestCount);
    if(id == "TestAdapter10" || id == "TestAdapter10-2")
    {
        test(current.encoding == Ice::Encoding_1_0);
        response->ice_response(_registry->getAdapter("TestAdapter"));
        return;
    }

    // We add a small delay to make sure locator request queuing gets tested when
    // running the test on a fast machine
    IceUtil::ThreadControl::sleep(IceUtil::Time::milliSeconds(1));
    response->ice_response(_registry->getAdapter(id));
}
 virtual void
 findAdapterById_async(const Ice::AMD_Locator_findAdapterByIdPtr& response, const string&,
                       const Ice::Current& current) const
 {
     _controller->checkCallPause(current);
     Ice::CommunicatorPtr communicator = current.adapter->getCommunicator();
     response->ice_response(current.adapter->createDirectProxy(Ice::stringToIdentity("dummy")));
 }