class AbstractThreadedObservablePlugin extends AbstractObservablePlugin {

  @Override
  public final void removeObserver(final ObservablePlugin.PluginObserver observer) {
    super.removeObserver(observer);
    if (countObservers() == 0) {
      if (logger.isDebugEnabled()) {
        logger.debug("Stop the plugin monitoring.");
      }
      if (thread != null) {
        thread.end();
      }
    }
  }

  protected  AbstractThreadedObservablePlugin(String name);

}