Package ghidra.framework.protocol.ghidra

# Class Handler

java.lang.Object
java.net.URLStreamHandler
ghidra.framework.protocol.ghidra.Handler

public class Handler extends URLStreamHandler
`Handler` provides a "ghidra" URL protocol handler which corresponds to the `GhidraURLConnection` implementation.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Handler()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static boolean`
  `isSupportedURL(URL url)`
  Determine if the specified url is supported and that any required protocol extensions are recognized.
  `protected URLConnection`
  `openConnection(URL url)`
  `static void`
  `registerHandler()`
  Register the "ghidra" URL protocol Handler.

  ### Methods inherited from class java.net.URLStreamHandler

  `equals, getDefaultPort, getHostAddress, hashCode, hostsEqual, openConnection, parseURL, sameFile, setURL, setURL, toExternalForm`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### Handler

    public Handler()

- ## Method Details

  - ### 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 a `ClientAuthenticator` also be registered.
    See Also:
      - `ClientUtil.setClientAuthenticator(ghidra.framework.client.ClientAuthenticator)`

  - ### isSupportedURL

    public static boolean isSupportedURL(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 URLConnection openConnection(URL url) throws IOException
    Specified by:
      `openConnection` in class `URLStreamHandler`
    Throws:
      `IOException`