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.

@FunctionalInterface public interface ConnectionFunction
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 Type
    Method
    Description
    Mono<io.r2dbc.postgresql.client.Client>
    connect(SocketAddress endpoint, io.r2dbc.postgresql.client.ConnectionSettings settings)
    Establish a connection to the given endpoint applying ConnectionSettings.
  • Method Details

    • connect

      Mono<io.r2dbc.postgresql.client.Client> connect(SocketAddress endpoint, io.r2dbc.postgresql.client.ConnectionSettings settings)
      Establish a connection to the given endpoint applying ConnectionSettings.
      Parameters:
      endpoint - the endpoint to connect to
      settings - the settings to apply
      Returns:
      a mono that connects to the given endpoint upon subscription
      Throws:
      IllegalArgumentException - if socketAddress or settings is null