Class ReferenceContext

java.lang.Object
septogeddon.pluginquery.library.remote.ReferenceContext

public class ReferenceContext extends Object
Context containing object references and prevent object from GarbageCollector
Author:
Thito Yalasatria Sunarya
  • Constructor Details

    • ReferenceContext

      public ReferenceContext()
  • Method Details

    • clearReferences

      public void clearReferences()
      Clear all references
    • getExistingReference

      public ObjectReference getExistingReference(long id)
      Get existing reference saved on this Remote side
      Parameters:
      id - the id of reference object
      Returns:
      the reference object
    • putExistingReference

      public void putExistingReference(ObjectReference reference)
      Put existing reference into this Remote side
      Parameters:
      reference - the reference object
    • createReference

      public ReferencedObject createReference(TypeHint hint, Object object)
      Create or get existing reference
      Parameters:
      object - the object instance
      Returns:
      a referenced object
    • closeReference

      public void closeReference(long id)
      Close reference
      Parameters:
      id - reference id
    • getReferenced

      public ReferencedObject getReferenced(long id)
      Get existing reference
      Parameters:
      id - reference id
      Returns:
      the referenced object