@Override public void registerMethods(final RSBLocalServer server) throws CouldNotPerformException { super.registerMethods(server); RPCHelper.registerInterface(AppRegistry.class, this, server); }
@Override public void waitForData() throws CouldNotPerformException, InterruptedException { CachedUnitRegistryRemote.waitForData(); super.waitForData(); }
@Override protected void deactivateRemoteRegistries() throws CouldNotPerformException, InterruptedException { getRegistryRemotes().forEach((registryRemote) -> { registryRemote.removeDataObserver(virtualRegistrySynchronizer); }); super.deactivateRemoteRegistries(); }
@Override protected void postInit() throws InitializationException, InterruptedException { super.postInit(); //To change body of generated methods, choose Tools | Templates. try { try { registerRegistryRemotes(); } catch (CouldNotPerformException ex) { throw new CouldNotPerformException("Could not register all registry remotes!", ex); } } catch (CouldNotPerformException ex) { throw new InitializationException(this, ex); } }
@Override protected void activateRemoteRegistries() throws CouldNotPerformException, InterruptedException { /* The order here is important! * If the VirtualRegistrySynchronizer would be registered first the data type would be notified while the remote registries * have not synced. This way getter for the VirtualRegistryController would not contain the updated values when called within an observer. */ super.activateRemoteRegistries(); getRegistryRemotes().forEach((registryRemote) -> { registryRemote.addDataObserver(virtualRegistrySynchronizer); // perform initial sync if data already available if (registryRemote.isDataAvailable()) { try { virtualRegistrySynchronizer.update(null, (RM) registryRemote.getData()); } catch (CouldNotPerformException ex) { ExceptionPrinter.printHistory(new CouldNotPerformException("Initial sync of [" + this + "] failed", ex), logger, LogLevel.WARN); } } }); }
/** * {@inheritDoc} * * @param server {@inheritDoc} * @throws CouldNotPerformException {@inheritDoc} */ @Override public void registerMethods(final RSBLocalServer server) throws CouldNotPerformException { super.registerMethods(server); RPCHelper.registerInterface(DeviceRegistry.class, this, server); }
/** * {@inheritDoc} * * @param server * @throws org.openbase.jul.exception.CouldNotPerformException {@inheritDoc} */ @Override public void registerMethods(final RSBLocalServer server) throws CouldNotPerformException { super.registerMethods(server); RPCHelper.registerInterface(LocationRegistry.class, this, server); }
@Override public void registerMethods(final RSBLocalServer server) throws CouldNotPerformException { super.registerMethods(server); RPCHelper.registerInterface(AgentRegistry.class, this, server); }
@Override public void registerMethods(final RSBLocalServer server) throws CouldNotPerformException { super.registerMethods(server); RPCHelper.registerInterface(SceneRegistry.class, this, server); }