Information
We are currently investigating an issue with the editor of some pages. Please save your work and avoid to create new pages until this banner is gone.
...
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
#include <AsyncClientImpl.h> #include <ACSErrTypeOK.h> AsyncClientImpl::AsyncClientImpl(const ACE_CString& name, maci::ContainerServices* containerServices) : acscomponent::ACSComponentImpl(name, containerServices) { } AsyncClientImpl::~AsyncClientImpl() { } void AsyncClientImpl::delay(ACS::uLong delay) { examples::Async_var comp = getContainerServices().getComponent<examples::Async>("ASYNC_CPP", 0, true); MyCBImpl cb; ACS::OffShoot_var examplesoffshoot = getContainerServices().activateOffShoot(&cb); examples::MyCallback_var cbObj = cb._this(examples::MyCallback::_narrow(offshoot); ACS_SHORT_LOG((LM_INFO, "%s", cb.status)); comp->delayAsync(delay, cbObj.in()); ACS_SHORT_LOG((LM_INFO, "%s", cb.status)); sleep(delay/2+1); ACS_SHORT_LOG((LM_INFO, "%s", cb.status)); sleep(delay/2+1); ACS_SHORT_LOG((LM_INFO, "%s", cb.status)); getContainerServices().releaseComponent("ASYNC_CPP"); getContainerServices().deactivateOffShoot(&cb) } /* --------------- [ MACI DLL support functions ] -----------------*/ #include <maciACSComponentDefines.h> MACI_DLL_SUPPORT_FUNCTIONS(AsyncImplAsyncClientImpl) /* ----------------------------------------------------------------*/ |