Class PollableInputStream.PollableInputStreamInterface

java.lang.Object
org.javagi.base.ProxyInstance
org.gnome.gobject.TypeInterface
org.gnome.gio.PollableInputStream.PollableInputStreamInterface
All Implemented Interfaces:
Proxy
Enclosing interface:
PollableInputStream

public static class PollableInputStream.PollableInputStreamInterface extends TypeInterface

The interface for pollable input streams.

The default implementation of canPoll always returns true.

The default implementation of readNonblocking calls g_pollable_input_stream_is_readable(), and then calls g_input_stream_read() if it returns true. This means you only need to override it if it is possible that your isReadable implementation may return true when the stream is not actually readable.

Since:
2.28
  • Constructor Details

    • PollableInputStreamInterface

      public PollableInputStreamInterface(MemorySegment address)
      Create a PollableInputStreamInterface proxy instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
  • Method Details

    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • overrideCanPoll

      public void overrideCanPoll(Arena arena, @Nullable Method method)
      Override virtual method can_poll.
      Parameters:
      method - the method to invoke
    • overrideIsReadable

      public void overrideIsReadable(Arena arena, @Nullable Method method)
      Override virtual method is_readable.
      Parameters:
      method - the method to invoke
    • overrideCreateSource

      public void overrideCreateSource(Arena arena, @Nullable Method method)
      Override virtual method create_source.
      Parameters:
      method - the method to invoke
    • overrideReadNonblocking

      public void overrideReadNonblocking(Arena arena, @Nullable Method method)
      Override virtual method read_nonblocking.
      Parameters:
      method - the method to invoke