Class Handle

java.lang.Object
com.oracle.libuv.Handle
All Implemented Interfaces:
java.io.Closeable, java.lang.AutoCloseable
Direct Known Subclasses:
AsyncHandle, CheckHandle, IdleHandle, PipeHandle, PrepareHandle, ProcessHandle, TCPHandle, TimerHandle, UDPHandle

public abstract class Handle
extends java.lang.Object
implements java.io.Closeable
The base class for handle. See Base handle
  • Field Summary

    Fields 
    Modifier and Type Field Description
    protected LoopHandle loop  
    protected long pointer  
  • Method Summary

    Modifier and Type Method Description
    boolean equals​(java.lang.Object other)  
    int hashCode()  
    boolean isClosing()
    Retrieves whether this handle has been closed.
    void ref()
    Reference this handle.
    java.lang.String toString()  
    void unref()
    Un-reference this handle.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface java.io.Closeable

    close
  • Field Details

  • Method Details

    • ref

      public void ref()
      Reference this handle.

      References are idempotent, that is, if a handle is already referenced calling this function again will have no effect.

    • unref

      public void unref()
      Un-reference this handle.

      References are idempotent, that is, if a handle is not referenced calling this function again will have no effect.

    • isClosing

      public boolean isClosing()
      Retrieves whether this handle has been closed.

      This function should only be used between the initialization of the handle and the arrival of the close callback.

      Returns:
      false if the handle is closing or closed, true otherwise.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object
    • equals

      public boolean equals​(java.lang.Object other)
      Overrides:
      equals in class java.lang.Object
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object