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
ConstructorsConstructorDescriptionContentTypeQueryTask(URL ghidraUrl) Construct a Ghidra URL content type query task -
Method Summary
Modifier and TypeMethodDescriptionGet the discovered content type (e.g., "Program")voidprocessResult(DomainFile domainFile, URL url, TaskMonitor monitor) Process the specifieddomainFilequery result.Methods inherited from class ghidra.framework.protocol.ghidra.GhidraURLQueryTask
handleError, isDone, processResult, runMethods inherited from class ghidra.util.task.Task
addTaskListener, canCancel, cancel, getStatusTextAlignment, getTaskTitle, getWaitForTaskCompleted, hasProgress, isCancelled, isModal, monitoredRun, notifyTaskListeners, setHasProgressMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:GhidraURLResultHandlerProcess the specifieddomainFilequery result. Dissemination of thedomainFileinstance 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 thedomainFileinstance will become invalid.- Specified by:
processResultin interfaceGhidraURLResultHandler- Overrides:
processResultin classGhidraURLQueryTask- Parameters:
domainFile-DomainFileto which the URL refers.url- URL which was used to retrieve the specifieddomainFilemonitor- task monitor
-