Class Handle

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

public abstract class Handle extends Object implements Closeable
The base class for handle. See Base handle
  • Field Details

    • pointer

      protected final long pointer
    • loop

      protected final LoopHandle loop
  • 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 Object
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object