Class NettyTcpStrategy

java.lang.Object
com.lucimber.dbus.netty.NettyTcpStrategy
All Implemented Interfaces:
ConnectionStrategy

public final class NettyTcpStrategy extends Object implements ConnectionStrategy
Netty-based connection strategy for TCP transport.

This strategy handles connections over TCP/IP sockets using NIO transport with optimizations for D-Bus communication.

  • Constructor Details

    • NettyTcpStrategy

      public NettyTcpStrategy()
  • Method Details

    • supports

      public boolean supports(SocketAddress address)
      Description copied from interface: ConnectionStrategy
      Checks if this strategy can handle the given socket address.
      Specified by:
      supports in interface ConnectionStrategy
      Parameters:
      address - the socket address to check
      Returns:
      true if this strategy supports the address type
    • connect

      Description copied from interface: ConnectionStrategy
      Establishes a connection using this transport strategy.
      Specified by:
      connect in interface ConnectionStrategy
      Parameters:
      address - the socket address to connect to
      config - connection configuration
      context - connection context providing callbacks and handlers
      Returns:
      CompletionStage that completes when connection is established
    • getTransportName

      public String getTransportName()
      Description copied from interface: ConnectionStrategy
      Gets a human-readable name for this transport strategy.
      Specified by:
      getTransportName in interface ConnectionStrategy
      Returns:
      transport name for logging
    • isAvailable

      public boolean isAvailable()
      Description copied from interface: ConnectionStrategy
      Checks if the required transport capabilities are available on this platform.
      Specified by:
      isAvailable in interface ConnectionStrategy
      Returns:
      true if this transport can be used on the current platform