Interface ConnectionFunction
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Interface defining a function how to connect to a single
endpoint applying ConnectionSettings.
A connection function is a low-level utility whose result is a valid Client object. Connection functions may perform multiple connection attempts (e.g. SSL handshake downgrading).
Topology discovery is a higher-level concept that is typically encapsulated as part of a ConnectionStrategy.
- Since:
- 1.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionMono<io.r2dbc.postgresql.client.Client> connect(SocketAddress endpoint, io.r2dbc.postgresql.client.ConnectionSettings settings) Establish a connection to the givenendpointapplyingConnectionSettings.
-
Method Details
-
connect
Mono<io.r2dbc.postgresql.client.Client> connect(SocketAddress endpoint, io.r2dbc.postgresql.client.ConnectionSettings settings) Establish a connection to the givenendpointapplyingConnectionSettings.- Parameters:
endpoint- the endpoint to connect tosettings- the settings to apply- Returns:
- a mono that connects to the given endpoint upon subscription
- Throws:
IllegalArgumentException- ifsocketAddressorsettingsisnull
-