Interface ConnectionHandle

All Known Implementing Classes:
NettyConnectionHandle

public interface ConnectionHandle
Transport-agnostic handle representing an active D-Bus connection.

This interface abstracts the underlying transport implementation and provides a unified way to interact with the connection regardless of whether it's using Netty, NIO, or any other networking framework.

  • Method Details

    • isActive

      boolean isActive()
      Checks if the connection is currently active and ready for communication.
      Returns:
      true if the connection is active
    • send

      Sends a message over this connection.
      Parameters:
      message - the outbound message to send
      Returns:
      CompletionStage that completes when the message is sent
    • sendRequest

      Sends a request message and waits for a response.
      Parameters:
      message - the outbound request message
      Returns:
      CompletionStage that completes with the response message
    • getNextSerial

      DBusUInt32 getNextSerial()
      Gets the next available serial number for message sequencing.
      Returns:
      the next serial number
    • close

      Closes this connection handle and releases associated resources.
      Returns:
      CompletionStage that completes when the connection is closed
    • getAssignedBusName

      String getAssignedBusName()
      Gets the assigned D-Bus name for this connection, if available.
      Returns:
      the assigned bus name, or null if not yet assigned