Class Handler
- java.lang.Object
-
- java.net.URLStreamHandler
-
- fish.payara.micro.boot.loader.jar.Handler
-
public class Handler extends URLStreamHandler
URLStreamHandler
for Spring Boot loaderJarFile
s.- Author:
- Phillip Webb
- See Also:
JarFile.registerUrlProtocolHandler()
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description JarFile
getRootJarFileFromUrl(URL url)
protected URLConnection
openConnection(URL url)
static void
setUseFastConnectionExceptions(boolean useFastConnectionExceptions)
Set if a generic static exception can be thrown when a URL cannot be connected.-
Methods inherited from class java.net.URLStreamHandler
equals, getDefaultPort, getHostAddress, hashCode, hostsEqual, openConnection, parseURL, sameFile, setURL, setURL, toExternalForm
-
-
-
-
Constructor Detail
-
Handler
public Handler()
-
Handler
public Handler(JarFile jarFile)
-
-
Method Detail
-
openConnection
protected URLConnection openConnection(URL url) throws IOException
- Specified by:
openConnection
in classURLStreamHandler
- Throws:
IOException
-
getRootJarFileFromUrl
public JarFile getRootJarFileFromUrl(URL url) throws IOException
- Throws:
IOException
-
setUseFastConnectionExceptions
public static void setUseFastConnectionExceptions(boolean useFastConnectionExceptions)
Set if a generic static exception can be thrown when a URL cannot be connected. This optimization is used during class loading to save creating lots of exceptions which are then swallowed.- Parameters:
useFastConnectionExceptions
- if fast connection exceptions can be used.
-
-