Package ghidra.framework.protocol.ghidra
Class GetUrlContentTypeTask
java.lang.Object
ghidra.util.task.Task
ghidra.framework.protocol.ghidra.GetUrlContentTypeTask
- All Implemented Interfaces:
MonitoredRunnable
A blocking/modal Ghidra URL content type discovery task
-
Field Summary
Fields inherited from class ghidra.util.task.Task
taskMonitor, waitForTaskCompleted
-
Constructor Summary
ConstructorsConstructorDescriptionGetUrlContentTypeTask
(URL ghidraUrl) Construct a Ghidra URL content type discovery task -
Method Summary
Modifier and TypeMethodDescriptionGet the discovered content type (e.g., "Program")void
run
(TaskMonitor monitor) This is the method that will be called to do the workMethods inherited from class ghidra.util.task.Task
addTaskListener, canCancel, cancel, getStatusTextAlignment, getTaskTitle, getWaitForTaskCompleted, hasProgress, isCancelled, isModal, monitoredRun, notifyTaskListeners, setHasProgress
-
Constructor Details
-
GetUrlContentTypeTask
Construct a Ghidra URL content type discovery task- Parameters:
ghidraUrl
- Ghidra URL (local or remote)- Throws:
IllegalArgumentException
- if specified URL is not a Ghidra URL (seeGhidraURL
).
-
-
Method Details
-
getContentType
Get the discovered content type (e.g., "Program")- Returns:
- content type or null if error occured or unsupported URL content
- Throws:
IllegalStateException
- if task has not completed execution
-
run
Description copied from class:Task
This is the method that will be called to do the workNote: The run(TaskMonitor) method should not make any calls directly on Swing components, as these calls are not thread safe. Place Swing calls in a Runnable, then call
Swing.runLater(Runnable)
orSwing.runNow(Runnable)
to schedule the Runnable inside of the AWT Event Thread.
-