Class PlurlImpl
- All Implemented Interfaces:
- Plurl
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionclassstatic interfaceclassclassclassclass
- 
Field SummaryFields inherited from interface org.eclipse.equinox.plurl.PlurlPLURL_ADD_CONTENT_HANDLER_FACTORY, PLURL_ADD_URL_STREAM_HANDLER_FACTORY, PLURL_FORBID_NOTHING, PLURL_OP, PLURL_PROTOCOL, PLURL_REGISTER_IMPLEMENTATION, PLURL_REMOVE_CONTENT_HANDLER_FACTORY, PLURL_REMOVE_URL_STREAM_HANDLER_FACTORY, PLURL_UNREGISTER_IMPLEMENTATION
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptiongetStaticField(Class<?> clazz, Class<?> type) voidInstalls the plurl factories into the JVM singletons.voidIf this plurl instance is the primordial factory for the JVM then uninstall is a no-op and the plurl instance will remain set with the JVM for the lifetime of the JVM instance.
- 
Constructor Details- 
PlurlImplpublic PlurlImpl()
 
- 
- 
Method Details- 
installDescription copied from interface:PlurlInstalls the plurl factories into the JVM singletons. If plurl factories are already installed then this plurl instance isregisteredwith the existing plurl instance set with the JVM by using something like the following:((Consumer<Object>) ("plurl://op/plurlRegisterImplementation").getContent()).accept(this);If the plurl factories cannot be installed then anIllegalStateExceptionis thrown.If the JVM singletons are already set with other factories that are not plurl then an attempt is made to override the JVM singletons with this plurl instance. This may only be possible if the implementation is allowed to do deep reflection on the java.netpackage. If the JVM singletons are overriden then the original singleton factory instances must be used as parent factories of the plurl instance until the plurl instance isuninstalled. if overriding the JVM singletons is not possible then anIllegalStateExceptionis thrown.If the JVM singletons were not overriden then this plurl instance is considered the primordial singleton factory for the JVM. Such a plurl instance cannot be uninstalledand will live the lifetime of the JVM.When this method returns without throwing an exception then the following will be true: - The singleton
 URL.setURLStreamHandlerFactory(URLStreamHandlerFactory)is set with a plurl implementation which delegates to thePlurlStreamHandlerFactoryobjects that have beenadded.
- The singleton
 URLConnection.setContentHandlerFactory(ContentHandlerFactory)is set with a plurl implementation which delegates to thePlurlContentHandlerFactoryobjects that have beenadded.
- The plurlprotocol is available for creatingURLobjects.
- If plurl factories are already installed then this plurl implementation is registered as a delegate with the already installed plurl instance.
 - Specified by:
- installin interface- Plurl
- Parameters:
- forbidden- builtin JVM protocols that cannot be overridden by plurl. If no forbidden protocols are specified then the default forbidden protocols are 'jar', 'jmod', 'file', and 'jrt'. To forbid no protocols then use the value- Plurl.PLURL_FORBID_NOTHING
 
- The singleton
 
- 
uninstallpublic void uninstall()Description copied from interface:PlurlIf this plurl instance is the primordial factory for the JVM then uninstall is a no-op and the plurl instance will remain set with the JVM for the lifetime of the JVM instance.If this plurl is not the primordial factory and is the current plurl set with the JVM singletons then this plurl instance must do the following: - Reset the original parent factories as the singleton factories of the JVM
- If there are any other plurl instances that got
 registeredwith this plurl instance then one of the registered plurl instances must be selected to be the next delegate plurl instance toinstall.
- If a delegate plurl instance gets installed then any existing factories
 that were added to this plurl instance must be added to the new delegate
 plurl instance and any registeredplurl instances must be registered with the new delegate plurl instance.
- This plurl instance must release all references to other factories or plurl instances.
 registeredwith the existing plurl instance set with the JVM by using something like the following:((Consumer<Object>) ("plurl://op/plurlRegisterImplementation").getContent()).accept(this);
- 
getStaticField
 
-