Package ghidra.framework.protocol.ghidra
Class ContentTypeQueryTask
java.lang.Object
ghidra.util.task.Task
ghidra.framework.protocol.ghidra.GhidraURLQueryTask
ghidra.framework.protocol.ghidra.ContentTypeQueryTask
- All Implemented Interfaces:
GhidraURLResultHandler
,MonitoredRunnable
A blocking/modal Ghidra URL content type discovery task
-
Field Summary
Fields inherited from class ghidra.util.task.Task
taskMonitor, waitForTaskCompleted
-
Constructor Summary
ConstructorDescriptionContentTypeQueryTask
(URL ghidraUrl) Construct a Ghidra URL content type query task -
Method Summary
Modifier and TypeMethodDescriptionGet the discovered content type (e.g., "Program")void
processResult
(DomainFile domainFile, URL url, TaskMonitor monitor) Process the specifieddomainFile
query result.Methods inherited from class ghidra.framework.protocol.ghidra.GhidraURLQueryTask
handleError, isDone, processResult, run
Methods inherited from class ghidra.util.task.Task
addTaskListener, canCancel, cancel, getStatusTextAlignment, getTaskTitle, getWaitForTaskCompleted, hasProgress, isCancelled, isModal, monitoredRun, notifyTaskListeners, setHasProgress
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ghidra.framework.protocol.ghidra.GhidraURLResultHandler
handleUnauthorizedAccess
-
Constructor Details
-
ContentTypeQueryTask
Construct a Ghidra URL content type query 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
-
processResult
Description copied from interface:GhidraURLResultHandler
Process the specifieddomainFile
query result. Dissemination of thedomainFile
instance should be restricted and any use of it completed before the call to this method returns. Upon return from this method call the underlying connection will be closed and at which time thedomainFile
instance will become invalid.- Specified by:
processResult
in interfaceGhidraURLResultHandler
- Overrides:
processResult
in classGhidraURLQueryTask
- Parameters:
domainFile
-DomainFile
to which the URL refers.url
- URL which was used to retrieve the specifieddomainFile
monitor
- task monitor
-