private static ServiceRegistrarFactory createFactory ( final Path path ) { final ServiceRegistrarFactory factory ; final Path absolutePath = path . toAbsolutePath ( ) ; try { factory = ServiceRegistrarLoader . load ( absolutePath ) ; final String name = factory . getClass ( ) . getName ( ) ; log . info ( "Loaded service registrar plugin: {} ({})" , name , absolutePath ) ; } catch ( ServiceRegistrarLoadingException e ) { throw new RuntimeException ( "Unable to load service registrar plugin: " + absolutePath , e ) ; } return factory ; }
Get a registrar factory from a plugin .