protected PluginSpecification specifyPlugin(String prefix,String name) throws ReplicatorException {
  String pluginPrefix=prefix + "." + name.trim();
  String rawClassName=properties.getString(pluginPrefix);
  if (rawClassName == null)   throw new ReplicatorException("Plugin class name property is missing or null:  key=" + pluginPrefix);
  String pluginClassName=rawClassName.trim();
  if (logger.isDebugEnabled())   logger.debug("Loading plugin: key=" + pluginPrefix + " class name="+ pluginClassName);
  TungstenProperties pluginProperties=properties.subset(pluginPrefix + ".",true);
  if (logger.isDebugEnabled())   logger.debug("Plugin properties: " + pluginProperties.toString());
  Class<?> pluginClass;
  try {
    pluginClass=PluginLoader.loadClass(pluginClassName);
  }
 catch (  PluginException e) {
    throw new ReplicatorException("Unable to instantiate plugin class: key=" + pluginPrefix + " class name="+ pluginClassName,e);
  }
  return new PluginSpecification(pluginPrefix,name,pluginClass,pluginProperties);
}

protected PluginSpecification specifyPlugin ( String prefix , String name ) throws ReplicatorException { String pluginPrefix = prefix + "." + name . trim ( ) ; String rawClassName = properties . getString ( pluginPrefix ) ; if ( rawClassName == null ) throw new ReplicatorException ( "Plugin class name property is missing or null:  key=" + pluginPrefix ) ; String pluginClassName = rawClassName . trim ( ) ; if ( logger . isDebugEnabled ( ) ) logger . debug ( "Loading plugin: key=" + pluginPrefix + " class name=" + pluginClassName ) ; TungstenProperties pluginProperties = properties . subset ( pluginPrefix + "." , true ) ; if ( logger . isDebugEnabled ( ) ) logger . debug ( "Plugin properties: " + pluginProperties . toString ( ) ) ; Class < ? > pluginClass ; try { pluginClass = PluginLoader . loadClass ( pluginClassName ) ; } catch ( PluginException e ) { throw new ReplicatorException ( "Unable to instantiate plugin class: key=" + pluginPrefix + " class name=" + pluginClassName , e ) ; } return new PluginSpecification ( pluginPrefix , name , pluginClass , pluginProperties ) ; }
generic code to load and configure a plugin .
