예제 #1
0
  /** {@inheritDoc} */
  public void allBindingsChanged(BindingProvider provider) {
    super.allBindingsChanged(provider);

    if (bindingsExist()) {
      activeService.activate();
    } else {
      activeService.deactivate();
    }
  }
예제 #2
0
  /** {@inheritDoc} */
  public void bindingChanged(BindingProvider provider, String itemName) {
    super.bindingChanged(provider, itemName);

    if (bindingsExist()) {
      activeService.activate();
    } else {
      activeService.deactivate();
    }
  }
예제 #3
0
 /** @{inheritDoc} */
 @Override
 public void interrupt() {
   if (!bindingsExist()) {
     super.interrupt();
   } else {
     logger.trace("{} won't be interrupted because bindings exist.", getName());
   }
 }
예제 #4
0
  /**
   * 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();
    }
  }
예제 #5
0
 /**
  * @return <code>true</code> if this binding is configured properly which means that all necessary
  *     data is available
  */
 protected boolean isProperlyConfigured() {
   return activeService.isProperlyConfigured();
 }
예제 #6
0
 /**
  * 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);
   }
 }
예제 #7
0
 /**
  * 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();
 }
예제 #8
0
 /** {@inheritDoc} */
 @Override
 protected void start() {
   super.start();
 }