Class AbstractUrlAllowListProvider
java.lang.Object
ghidra.framework.client.AbstractUrlAllowListProvider
- All Implemented Interfaces:
UrlAllowListProvider
- Direct Known Subclasses:
DefaultGhidraUrlAllowListProvider
AbstractUrlAllowListProvider provides the abstract URL allow list provider.
NOTE: See UrlAllowListManager for persistent allow list which will be consulted before
prompting user and updated if user allows access.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static BooleanaccessAllowed(URL url) Determine if access has previously been determined and return access state.protected static StringgetBaseURL(URL url) Get the base URL form which only includes protocol, server and port.protected static intGet the port to be accessed by the specified URL.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface UrlAllowListProvider
isAllowed
-
Constructor Details
-
AbstractUrlAllowListProvider
public AbstractUrlAllowListProvider()
-
-
Method Details
-
accessAllowed
Determine if access has previously been determined and return access state. This method will return true for opaque or non-server URLs.- Parameters:
url- server URL- Returns:
- true if access allowed or URL type is not handled by allow list, false if access is disallowed, or null if no allow list entry exists.
-
getPort
Get the port to be accessed by the specified URL. If not specified, the default port will be returned.- Parameters:
url- server URL- Returns:
- URL port
-
getBaseURL
Get the base URL form which only includes protocol, server and port.- Parameters:
url- server URL- Returns:
- simplified base URL (e.g., ghidra://host/repo )
- Throws:
IllegalArgumentException- if URL does not specify an authority
-