Package ghidra.framework.protocol.ghidra
Class Handler
- java.lang.Object
-
- java.net.URLStreamHandler
-
- ghidra.framework.protocol.ghidra.Handler
-
public class Handler extends java.net.URLStreamHandler
Handler
provides a "ghidra" URL protocol handler which corresponds to theGhidraURLConnection
implementation.
-
-
Constructor Summary
Constructors Constructor Description Handler()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static boolean
isSupportedURL(java.net.URL url)
Determine if the specified url is supported and that any required protocol extensions are recognized.protected java.net.URLConnection
openConnection(java.net.URL url)
static void
registerHandler()
Register the "ghidra" URL protocol Handler.
-
-
-
Method Detail
-
registerHandler
public static void registerHandler()
Register the "ghidra" URL protocol Handler. Alternatively, the protocol handler can be explicitly used when instantiating a ghidra URL:URL url = new URL(null, "ghidra://myGhidraServer/Test", new ghidra.framework.protocol.ghidra.Handler());
It is also important that aClientAuthenticator
also be registered.
-
isSupportedURL
public static boolean isSupportedURL(java.net.URL url)
Determine if the specified url is supported and that any required protocol extensions are recognized.- Parameters:
url
-- Returns:
- true if support ghidra URL
-
openConnection
protected java.net.URLConnection openConnection(java.net.URL url) throws java.io.IOException
- Specified by:
openConnection
in classjava.net.URLStreamHandler
- Throws:
java.io.IOException
-
-