Class GhidraURLWrappedContent


  • public class GhidraURLWrappedContent
    extends java.lang.Object
    GhidraURLWrappedContent provides controlled access to a Ghidra folder/file associated with a Ghidra URL. It is important to note the issuance of this object does not guarantee existence of the requested resource. Any object obtained via the getContent method must be released via the release method. The following rules should be followed when using domain folder and files obtained.
    1. The getContent method may only be invoked once per consumer
    2. The content must be released when no longer in-use, however it should not be released until any derivative domain folders and files are no longer in use as well.
    3. A read-only or immutable domain object may remain open while the associated domain file/folder is released.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object getContent​(java.lang.Object consumer)
      Get the domain folder or file associated with the Ghidra URL.
      void release​(java.lang.Object content, java.lang.Object consumer)
      Indicates the content object previously obtained from this wrapper is no longer in-use and the underlying connection may be closed.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getContent

        public java.lang.Object getContent​(java.lang.Object consumer)
                                    throws java.io.IOException,
                                           NotFoundException
        Get the domain folder or file associated with the Ghidra URL. The consumer is responsible for releasing the content object via the release method when it is no longer in use.
        Parameters:
        consumer - object which is responsible for releasing the content
        Returns:
        domain file or folder
        Throws:
        java.io.IOException
        NotFoundException - if the Ghidra URL does no correspond to a folder or file within the Ghidra repository/project.
        See Also:
        release(Object, Object)
      • release

        public void release​(java.lang.Object content,
                            java.lang.Object consumer)
        Indicates the content object previously obtained from this wrapper is no longer in-use and the underlying connection may be closed. A read-only or immutable domain object may remain open and in-use after its associated domain folder/file has been released.
        Parameters:
        content -
        consumer -