class SeProxyService {

  public ReaderPlugin registerPlugin(PluginFactory pluginFactory) {

    if (pluginFactory == null) {
      throw new IllegalArgumentException("Factory must not be null");
    }

    synchronized (MONITOR) {
      final String pluginName = pluginFactory.getPluginName();
      if (this.plugins.containsKey(pluginName)) {
        logger.warn("Plugin has already been registered to the platform : {}", pluginName);
        return this.plugins.get(pluginName);
      } else {
        ReaderPlugin pluginInstance = pluginFactory.getPlugin();
        logger.info("Registering a new Plugin to the platform : {}", pluginName);
        this.plugins.put(pluginName, pluginInstance);
        return pluginInstance;
      }
    }
  }

  private  SeProxyService();

}