/** {@inheritDoc} */ public void allBindingsChanged(BindingProvider provider) { super.allBindingsChanged(provider); if (bindingsExist()) { activeService.activate(); } else { activeService.deactivate(); } }
/** {@inheritDoc} */ public void bindingChanged(BindingProvider provider, String itemName) { super.bindingChanged(provider, itemName); if (bindingsExist()) { activeService.activate(); } else { activeService.deactivate(); } }
/** @{inheritDoc} */ @Override public void interrupt() { if (!bindingsExist()) { super.interrupt(); } else { logger.trace("{} won't be interrupted because bindings exist.", getName()); } }
/** * Removes <code>provider</code> from the list of providers. If there is no provider left the * refresh thread is getting interrupted. * * @param provider the {@link BindingProvider} to remove */ public void removeBindingProvider(P provider) { super.removeBindingProvider(provider); // if there are no binding providers there is no need to run this // refresh thread any longer ... if (this.providers.size() == 0) { activeService.deactivate(); } }
/** * @return <code>true</code> if this binding is configured properly which means that all necessary * data is available */ protected boolean isProperlyConfigured() { return activeService.isProperlyConfigured(); }
/** * Used to define whether this binding is fully configured so that it can be activated and used. * Note that the implementation will automatically start the active service if <code>true</code> * is passed as a parameter and there are binding providers available. * * @param properlyConfigured */ protected void setProperlyConfigured(boolean properlyConfigured) { if (providers.size() > 0) { activeService.setProperlyConfigured(properlyConfigured); } }
/** * Adds <code>provider</code> to the list of {@link BindingProvider}s and adds <code>this</code> * as {@link BindingChangeListener}. If <code>provider</code> contains any binding an the * refresh-Thread is stopped it will be started. * * @param provider the new {@link BindingProvider} to add */ public void addBindingProvider(P provider) { super.addBindingProvider(provider); activeService.activate(); }
/** {@inheritDoc} */ @Override protected void start() { super.start(); }