public final class ConnectionFactories extends Object
ConnectionFactory
based on a set of ConnectionFactoryOptions
.Modifier and Type | Method and Description |
---|---|
static ConnectionFactory |
find(ConnectionFactoryOptions connectionFactoryOptions)
Returns a
ConnectionFactory if an available implementation can be created from a collection of ConnectionFactoryOptions . |
static ConnectionFactory |
get(ConnectionFactoryOptions connectionFactoryOptions)
Returns a
ConnectionFactory from an available implementation, created from a collection of ConnectionFactoryOptions . |
static ConnectionFactory |
get(String url)
Returns a
ConnectionFactory from an available implementation, created from a R2DBC Connection URL. |
static boolean |
supports(ConnectionFactoryOptions connectionFactoryOptions)
Returns whether a
ConnectionFactory can be created from a collection of ConnectionFactoryOptions . |
@Nullable public static ConnectionFactory find(ConnectionFactoryOptions connectionFactoryOptions)
ConnectionFactory
if an available implementation can be created from a collection of ConnectionFactoryOptions
.connectionFactoryOptions
- a collection of ConnectionFactoryOptions
ConnectionFactory
if one can be created, otherwise null
IllegalArgumentException
- if connectionSpecification
is null
public static ConnectionFactory get(String url)
ConnectionFactory
from an available implementation, created from a R2DBC Connection URL.
R2DBC URL format is:
r2dbc:driver[:protocol]
://[user:password@]host[:port][/path][?option=value]}.url
- the R2DBC connection urlConnectionFactory
IllegalArgumentException
- if url
is null
IllegalStateException
- if no available implementation can create a ConnectionFactory
public static ConnectionFactory get(ConnectionFactoryOptions connectionFactoryOptions)
ConnectionFactory
from an available implementation, created from a collection of ConnectionFactoryOptions
.connectionFactoryOptions
- a collection of ConnectionFactoryOptions
ConnectionFactory
IllegalArgumentException
- if connectionFactoryOptions
is null
IllegalStateException
- if no available implementation can create a ConnectionFactory
public static boolean supports(ConnectionFactoryOptions connectionFactoryOptions)
ConnectionFactory
can be created from a collection of ConnectionFactoryOptions
.connectionFactoryOptions
- a collection of ConnectionFactoryOptions
true
if a ConnectionFactory
can be created from a collection of ConnectionFactoryOptions
, false
otherwise.IllegalArgumentException
- if connectionFactoryOptions
is null
Copyright © 2019. All rights reserved.