Class ContentTypeQueryTask

All Implemented Interfaces:
GhidraURLResultHandler, MonitoredRunnable

public class ContentTypeQueryTask extends GhidraURLQueryTask
A blocking/modal Ghidra URL content type discovery task
  • Constructor Details

    • ContentTypeQueryTask

      public ContentTypeQueryTask(URL ghidraUrl)
      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 (see GhidraURL).
  • Method Details

    • getContentType

      public String 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

      public void processResult(DomainFile domainFile, URL url, TaskMonitor monitor)
      Description copied from interface: GhidraURLResultHandler
      Process the specified domainFile query result. Dissemination of the domainFile 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 the domainFile instance will become invalid.
      Specified by:
      processResult in interface GhidraURLResultHandler
      Overrides:
      processResult in class GhidraURLQueryTask
      Parameters:
      domainFile - DomainFile to which the URL refers.
      url - URL which was used to retrieve the specified domainFile
      monitor - task monitor