Class ClassLoaderUtils
java.lang.Object
org.frankframework.util.ClassLoaderUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable URLgetResourceURL(String resource) Get a resource-URL directly from the ClassPathstatic URLgetResourceURL(@Nullable IScopeProvider scopeProvider, @NonNull String resource) Get a resource-URL from a specific IConfigurationClassLoader.static @Nullable URLgetResourceURL(@Nullable IScopeProvider scopeProvider, @NonNull String resource, @Nullable String allowedProtocols) Get a resource-URL from a ClassLoader, therefore the resource should not start with a leading slash
-
Method Details
-
getResourceURL
-
getResourceURL
Get a resource-URL from a specific IConfigurationClassLoader. This should be used by classes which are part of the Ibis configuration (like pipes and senders) because the configuration might be loaded from outside the webapp ClassPath. Hence the Thread.currentThread().getContextClassLoader() at the time the class was instantiated should be used.- See Also:
-
getResourceURL
public static @Nullable URL getResourceURL(@Nullable IScopeProvider scopeProvider, @NonNull String resource, @Nullable String allowedProtocols) Get a resource-URL from a ClassLoader, therefore the resource should not start with a leading slash- Parameters:
scopeProvider- to retrieve the file from, or NULL when you want to retrieve the resource directly from the ClassPath (using an absolute path)resource- name of the resource you are trying to fetch the URL from- Returns:
- URL of the resource or null if it can't be not found
-
getAllowedProtocols
-