Klasse CallbackHandler

java.lang.Object
ch.bailu.gtk.lib.handler.CallbackHandler

public class CallbackHandler extends Object
Handler to callback resource. Stores java reference to callback in a hash map Provides function to free reference to callback
  • Konstruktorübersicht

    Konstruktoren
    Konstruktor
    Beschreibung
    CallbackHandler(Pointer instance, String methodName)
     
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    static void
    Dump resources (contents of internal map as text) to stream
    Get instance this callback ist registered to Only call this if this callbacks will never called again
    Name of method this callback was registered with
    void
    register(com.sun.jna.Callback callback)
    For internal use (gets called after callback was passed to a C function)
     
    void
    Unregister this callback Removes java reference to callback Only call this if this callbacks will never called again
    static void
    unregister(Pointer instance)
    Unregister all callbacks of this instance Removes java reference to callback Only call this if this callbacks will never called again
    static void
    unregister(Pointer instance, String methodName)
     
    void
    unregister(String methodName)
    Unregister this callback if its methodName equals methodName Removes java reference to callback Only call this if this callbacks will never called again

    Von Klasse geerbte Methoden java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Konstruktordetails

    • CallbackHandler

      public CallbackHandler(Pointer instance, String methodName)
  • Methodendetails

    • register

      public void register(com.sun.jna.Callback callback)
      For internal use (gets called after callback was passed to a C function)
      Parameter:
      callback - (lambda)
    • unregister

      public void unregister()
      Unregister this callback Removes java reference to callback Only call this if this callbacks will never called again
    • unregister

      public static void unregister(Pointer instance)
      Unregister all callbacks of this instance Removes java reference to callback Only call this if this callbacks will never called again
      Parameter:
      instance -
    • unregister

      public void unregister(String methodName)
      Unregister this callback if its methodName equals methodName Removes java reference to callback Only call this if this callbacks will never called again
      Parameter:
      methodName - string identifier (name)
    • unregister

      public static void unregister(Pointer instance, String methodName)
    • getInstance

      public Pointer getInstance()
      Get instance this callback ist registered to Only call this if this callbacks will never called again
      Gibt zurück:
      instance this callback belongs to
    • getMethodName

      public String getMethodName()
      Name of method this callback was registered with
      Gibt zurück:
      methodName
    • dump

      public static void dump(PrintStream out)
      Dump resources (contents of internal map as text) to stream
      Parameter:
      out - stream
    • toString

      public String toString()
      Setzt außer Kraft:
      toString in Klasse Object