Package com.lucimber.dbus.netty
Class NettyUnixSocketStrategy
java.lang.Object
com.lucimber.dbus.netty.NettyUnixSocketStrategy
- All Implemented Interfaces:
ConnectionStrategy
Netty-based connection strategy for Unix domain socket transport.
This strategy handles connections over Unix domain sockets using native transports (Epoll on Linux, KQueue on macOS) for optimal performance.
-
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.boolean
Checks if the required transport capabilities are available on this platform.boolean
supports
(SocketAddress address) Checks if this strategy can handle the given socket address.
-
Constructor Details
-
NettyUnixSocketStrategy
public NettyUnixSocketStrategy()
-
-
Method Details
-
supports
Description copied from interface:ConnectionStrategy
Checks if this strategy can handle the given socket address.- Specified by:
supports
in 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:ConnectionStrategy
Establishes a connection using this transport strategy.- Specified by:
connect
in 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:ConnectionStrategy
Gets a human-readable name for this transport strategy.- Specified by:
getTransportName
in interfaceConnectionStrategy
- 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 interfaceConnectionStrategy
- Returns:
- true if this transport can be used on the current platform
-