public static JobProxy fromFactory(JobsResourceConfig config){
  String jobProxyFactory=config.getJobProxyFactory();
  if (jobProxyFactory != null && !jobProxyFactory.isEmpty()) {
    try {
      JobProxyFactory factory=ClassLoaderHelper.<JobProxyFactory>fromClassName(jobProxyFactory);
      return factory.getJobProxy(config);
    }
 catch (    Exception e) {
      throw new SamzaException(e);
    }
  }
 else {
    throw new SamzaException("Missing config: " + JobsResourceConfig.CONFIG_JOB_PROXY_FACTORY);
  }
}

public static JobProxy fromFactory ( JobsResourceConfig config ) { String jobProxyFactory = config . getJobProxyFactory ( ) ; if ( jobProxyFactory != null && ! jobProxyFactory . isEmpty ( ) ) { try { JobProxyFactory factory = ClassLoaderHelper . < JobProxyFactory > fromClassName ( jobProxyFactory ) ; return factory . getJobProxy ( config ) ; } catch ( Exception e ) { throw new SamzaException ( e ) ; } } else { throw new SamzaException ( "Missing config: " + JobsResourceConfig . CONFIG_JOB_PROXY_FACTORY ) ; } }
creates a new jobproxy instance from the factory class specified in the config .
