void ClientStub::instantiateTransport() { CurrentClientStubSentry sentry(*this); if (!mTransport.get()) { RCF_VERIFY(mEndpoint.get(), Exception(_RcfError_NoEndpoint())); mTransport.reset( mEndpoint->createClientTransport().release() ); RCF_VERIFY(mTransport.get(), Exception(_RcfError_TransportCreation())); } if ( mAsync && !mTransport->isAssociatedWithIoService()) { RcfServer * preferred = getAsyncDispatcher(); AsioIoService * pIoService = NULL; if (preferred) { ServerTransport & transport = preferred->getServerTransport(); AsioServerTransport & asioTransport = dynamic_cast<AsioServerTransport &>(transport); pIoService = & asioTransport.getIoService(); } else { pIoService = & getAmiThreadPool().getIoService(); } mTransport->associateWithIoService(*pIoService); } }
void onServiceAddedProto(FilterService & fs, RcfServer & server) { boost::shared_ptr<FilterServicePb> fsPbPtr( new FilterServicePb(fs)); server.bind((I_RequestTransportFiltersPb *) NULL, fsPbPtr); }
void onServiceAddedProto(SessionObjectFactoryService & sofs, RcfServer & server) { boost::shared_ptr<SessionObjectFactoryServicePb> sofsPbPtr( new SessionObjectFactoryServicePb(sofs)); server.bind((I_SessionObjectFactoryPb *) NULL, sofsPbPtr); }
void onServiceAddedProto(ObjectFactoryService & ofs, RcfServer & server) { boost::shared_ptr<ObjectFactoryServicePb> ofsPbPtr( new ObjectFactoryServicePb(ofs) ); server.bind((I_ObjectFactoryPb *) NULL, ofsPbPtr); }
void ObjectFactoryService::onServerStart(RcfServer & server) { mTokenFactory.reset( new TokenFactory(server.getOfsMaxNumberOfObjects()) ); mClientStubTimeoutS = server.getOfsObjectTimeoutS(); mCleanupIntervalS = server.getOfsCleanupIntervalS(); mCleanupThreshold = server.getOfsCleanupThreshold(); RCF_ASSERT(0.0 <= mCleanupThreshold && mCleanupThreshold <= 1.0); // up-front initialization, before threads get into the picture typedef std::vector<Token>::const_iterator Iter; for ( Iter iter = mTokenFactory->getTokenSpace().begin(); iter != mTokenFactory->getTokenSpace().end(); ++iter) { mStubMap[*iter].first.reset(new Mutex()); } }
void ServerObjectService::onServerStart(RcfServer & server) { mpRcfServer = & server; mHarvestingIntervalS = server.getServerObjectHarvestingIntervalS(); if (mHarvestingIntervalS) { mPeriodicTimer.setIntervalMs(1000*mHarvestingIntervalS); mPeriodicTimer.start(); } }
bool UdpServerTransport::cycleTransportAndServer( RcfServer &server, int timeoutMs, const volatile bool &stopFlag) { if (!stopFlag && !mStopFlag) { cycle(timeoutMs/2, stopFlag); server.cycleSessions(timeoutMs/2, stopFlag); } return stopFlag || mStopFlag; }
void ObjectFactoryService::onServiceAdded(RcfServer &server) { server.bind((I_ObjectFactory *) NULL, *this); onServiceAddedProto(*this, server); mTaskEntries.clear(); mTaskEntries.push_back( TaskEntry( boost::bind(&ObjectFactoryService::cycleCleanup, this, _1, _2), boost::bind(&ObjectFactoryService::stopCleanup, this), "RCF Ofs cleanup")); mStopFlag = false; }
void FilterService::onServiceAdded(RcfServer & server) { server.bind( (I_RequestTransportFilters *) NULL, *this); onServiceAddedProto(*this, server); }
void onServiceRemovedProto(FilterService & fs, RcfServer & server) { server.unbind( (I_RequestTransportFiltersPb *) NULL); }
void FilterService::onServiceRemoved(RcfServer & server) { server.unbind( (I_RequestTransportFilters *) NULL); onServiceRemovedProto(*this, server); }
void CallbackConnectionService::onServerStart(RcfServer & server) { mOnCallbackConnectionCreated = server.getOnCallbackConnectionCreated(); }
void SessionObjectFactoryService::onServiceRemoved(RcfServer &server) { server.unbind( (I_SessionObjectFactory *) NULL); onServiceRemovedProto(*this, server); }
void SessionObjectFactoryService::onServiceAdded(RcfServer &server) { server.bind((I_SessionObjectFactory *) NULL, *this); onServiceAddedProto(*this, server); }
void onServiceRemovedProto(SessionObjectFactoryService & sofs, RcfServer & server) { server.unbind( (I_SessionObjectFactoryPb *) NULL); }
void onServiceRemovedProto(ObjectFactoryService &, RcfServer & server) { server.unbind( (I_ObjectFactoryPb *) NULL); }