@Override public void activate() throws InterruptedException, CouldNotPerformException { // TODO is this wait for data realy needed? blocking activation method is some kind of bad behaviour. CachedLocationRegistryRemote.waitForData(); serviceRemoteManager.activate(); super.activate(); }
/** * Method only returns if all available registries are synchronized. * * @throws CouldNotPerformException * @throws InterruptedException is thrown if thread is externally interrupted. */ public static void waitForData() throws CouldNotPerformException, InterruptedException { CachedUnitRegistryRemote.waitForData(); CachedAgentRegistryRemote.waitForData(); CachedAppRegistryRemote.waitForData(); CachedDeviceRegistryRemote.waitForData(); CachedLocationRegistryRemote.waitForData(); CachedSceneRegistryRemote.waitForData(); CachedUserRegistryRemote.waitForData(); CachedUserActivityRegistryRemote.waitForData(); }
public void updateUnitConfig(UnitConfig unitConfig, ServiceType serviceType) throws CouldNotPerformException, InterruptedException { try { CachedLocationRegistryRemote.waitForData(); try { getRemoteService().removeConnectionStateObserver(connectionStateObserver);