Class OptionsCapableConnectionFactory

java.lang.Object
org.springframework.boot.r2dbc.OptionsCapableConnectionFactory
All Implemented Interfaces:
io.r2dbc.spi.ConnectionFactory, io.r2dbc.spi.Wrapped<io.r2dbc.spi.ConnectionFactory>

public class OptionsCapableConnectionFactory extends Object implements io.r2dbc.spi.Wrapped<io.r2dbc.spi.ConnectionFactory>, io.r2dbc.spi.ConnectionFactory
ConnectionFactory capable of providing access to the ConnectionFactoryOptions from which it was built.
Since:
2.5.0
  • Constructor Summary

    Constructors
    Constructor
    Description
    OptionsCapableConnectionFactory(io.r2dbc.spi.ConnectionFactoryOptions options, io.r2dbc.spi.ConnectionFactory delegate)
    Create a new OptionsCapableConnectionFactory that will provide access to the given options that were used to build the given delegate ConnectionFactory.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.reactivestreams.Publisher<? extends io.r2dbc.spi.Connection>
     
    io.r2dbc.spi.ConnectionFactoryMetadata
     
    io.r2dbc.spi.ConnectionFactoryOptions
     
    io.r2dbc.spi.ConnectionFactory
     
    unwrapFrom(io.r2dbc.spi.ConnectionFactory connectionFactory)
    Returns, if possible, an OptionsCapableConnectionFactory by unwrapping the given connectionFactory as necessary.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.r2dbc.spi.Wrapped

    unwrap
  • Constructor Details

    • OptionsCapableConnectionFactory

      public OptionsCapableConnectionFactory(io.r2dbc.spi.ConnectionFactoryOptions options, io.r2dbc.spi.ConnectionFactory delegate)
      Create a new OptionsCapableConnectionFactory that will provide access to the given options that were used to build the given delegate ConnectionFactory.
      Parameters:
      options - the options from which the connection factory was built
      delegate - the delegate connection factory that was built with options
  • Method Details

    • getOptions

      public io.r2dbc.spi.ConnectionFactoryOptions getOptions()
    • create

      public org.reactivestreams.Publisher<? extends io.r2dbc.spi.Connection> create()
      Specified by:
      create in interface io.r2dbc.spi.ConnectionFactory
    • getMetadata

      public io.r2dbc.spi.ConnectionFactoryMetadata getMetadata()
      Specified by:
      getMetadata in interface io.r2dbc.spi.ConnectionFactory
    • unwrap

      public io.r2dbc.spi.ConnectionFactory unwrap()
      Specified by:
      unwrap in interface io.r2dbc.spi.Wrapped<io.r2dbc.spi.ConnectionFactory>
    • unwrapFrom

      public static OptionsCapableConnectionFactory unwrapFrom(io.r2dbc.spi.ConnectionFactory connectionFactory)
      Returns, if possible, an OptionsCapableConnectionFactory by unwrapping the given connectionFactory as necessary. If the given connectionFactory does not wrap an OptionsCapableConnectionFactory and is not itself an OptionsCapableConnectionFactory, null is returned.
      Parameters:
      connectionFactory - the connection factory to unwrap
      Returns:
      the OptionsCapableConnectionFactory or null
      Since:
      2.5.1