Interface BoltConnectionProvider


public interface BoltConnectionProvider
A Neo4j Bolt Protocol connection provider.

Its main objective is to establish Bolt connections.

Its intances are expected to be created using BoltConnectionProviderFactory that may be discovered using the ServiceLoader.

Since:
1.0.0
  • Method Details

    • connect

      CompletionStage<BoltConnection> connect(URI uri, String routingContextAddress, BoltAgent boltAgent, String userAgent, int connectTimeoutMillis, long initialisationTimeoutMillis, SecurityPlan securityPlan, AuthToken authToken, BoltProtocolVersion minVersion, NotificationConfig notificationConfig, ImmutableObservation parentObservation)
      Connects to the given URI using the provided parameters and returns BoltConnection instance.
      Parameters:
      uri - the connection URI
      routingContextAddress - the address to be used in the 'address' field of routing context. This applies to URI schemes that support routing context only. When set to null, the default behaviour of getting the address from the URI applies. This parameter should be used when an explicit address that differs from the one in the URI should be used.
      boltAgent - the BoltAgent
      userAgent - the User Agent
      connectTimeoutMillis - the connection timeout, 0 or negative disables timeout
      initialisationTimeoutMillis - the connection initialisation timeout, includes SSL and Bolt Handshake, 0 or negative disables timeout
      securityPlan - the SecurityPlan
      authToken - the AuthToken
      minVersion - the minimum BoltProtocolVersion
      notificationConfig - the NotificationConfig, this usually used in the Bolt HELLO message
      parentObservation - the parent ImmutableObservation that should be used as a parent for nested observations
      Returns:
      the BoltConnection instance
    • close

      Closes the BoltConnectionProvider instance.
      Returns:
      the close CompletionStage