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 ConnectionFactoryOptionsConnectionFactory if one can be created, otherwise nullIllegalArgumentException - if connectionSpecification is nullpublic 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 urlConnectionFactoryIllegalArgumentException - if url is nullIllegalStateException - if no available implementation can create a ConnectionFactorypublic static ConnectionFactory get(ConnectionFactoryOptions connectionFactoryOptions)
ConnectionFactory from an available implementation, created from a collection of ConnectionFactoryOptions.connectionFactoryOptions - a collection of ConnectionFactoryOptionsConnectionFactoryIllegalArgumentException - if connectionFactoryOptions is nullIllegalStateException - if no available implementation can create a ConnectionFactorypublic static boolean supports(ConnectionFactoryOptions connectionFactoryOptions)
ConnectionFactory can be created from a collection of ConnectionFactoryOptions.connectionFactoryOptions - a collection of ConnectionFactoryOptionstrue if a ConnectionFactory can be created from a collection of ConnectionFactoryOptions, false otherwise.IllegalArgumentException - if connectionFactoryOptions is nullCopyright © 2019. All rights reserved.