Package com.lucimber.dbus.netty
Class NettyTcpStrategy
java.lang.Object
com.lucimber.dbus.netty.NettyTcpStrategy
- All Implemented Interfaces:
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconnect(SocketAddress address, ConnectionConfig config, ConnectionContext context) Establishes a connection using this transport strategy.Gets a human-readable name for this transport strategy.booleanChecks if the required transport capabilities are available on this platform.booleansupports(SocketAddress address) Checks if this strategy can handle the given socket address.
-
Constructor Details
-
NettyTcpStrategy
public NettyTcpStrategy()
-
-
Method Details
-
supports
Description copied from interface:ConnectionStrategyChecks if this strategy can handle the given socket address.- Specified by:
supportsin interfaceConnectionStrategy- Parameters:
address- the socket address to check- Returns:
- true if this strategy supports the address type
-
connect
public CompletionStage<ConnectionHandle> connect(SocketAddress address, ConnectionConfig config, ConnectionContext context) Description copied from interface:ConnectionStrategyEstablishes a connection using this transport strategy.- Specified by:
connectin interfaceConnectionStrategy- Parameters:
address- the socket address to connect toconfig- connection configurationcontext- connection context providing callbacks and handlers- Returns:
- CompletionStage that completes when connection is established
-
getTransportName
Description copied from interface:ConnectionStrategyGets a human-readable name for this transport strategy.- Specified by:
getTransportNamein interfaceConnectionStrategy- Returns:
- transport name for logging
-
isAvailable
public boolean isAvailable()Description copied from interface:ConnectionStrategyChecks if the required transport capabilities are available on this platform.- Specified by:
isAvailablein interfaceConnectionStrategy- Returns:
- true if this transport can be used on the current platform
-