private PluginRegistryBean loadRegistry ( URI registryUrl ) { PluginRegistryBean fromCache = registryCache . get ( registryUrl ) ; if ( fromCache != null ) { return fromCache ; } try { PluginRegistryBean registry = mapper . reader ( PluginRegistryBean . class ) . readValue ( registryUrl . toURL ( ) ) ; registryCache . put ( registryUrl , registry ) ; return registry ; } catch ( IOException e ) { return null ; } }
Loads a plugin registry from its URL . Will use the value in the cache if it exists . If not it will connect to the remote URL and grab the registry JSON file .