public interface ConnectionFactoryProvider
ConnectionFactoryOptions
and optionally return an implementation of ConnectionFactory
.
ConnectionFactoryProvider
implementations are typically discovered by ConnectionFactories
from the class path using ServiceLoader
.
Modifier and Type | Method and Description |
---|---|
ConnectionFactory |
create(ConnectionFactoryOptions connectionFactoryOptions)
Creates a new
ConnectionFactory given a collection of ConnectionFactoryOptions . |
String |
getDriver()
Returns the driver identifier used by the driver.
|
boolean |
supports(ConnectionFactoryOptions connectionFactoryOptions)
Whether this
ConnectionFactoryProvider supports this collection of ConnectionFactoryOptions . |
ConnectionFactory create(ConnectionFactoryOptions connectionFactoryOptions)
ConnectionFactory
given a collection of ConnectionFactoryOptions
. This method is only called if a previous invocation of
supports(ConnectionFactoryOptions)
has returned true
.connectionFactoryOptions
- a collection of ConnectionFactoryOptions
ConnectionFactory
created from this collection of ConnectionFactoryOptions
IllegalArgumentException
- if connectionFactoryOptions
is null
boolean supports(ConnectionFactoryOptions connectionFactoryOptions)
ConnectionFactoryProvider
supports this collection of ConnectionFactoryOptions
.connectionFactoryOptions
- a collection of ConnectionFactoryOptions
true
if this ConnectionFactoryProvider
supports this collection of ConnectionFactoryOptions
, false
otherwiseIllegalArgumentException
- if connectionFactoryOptions
is null
String getDriver()
ConnectionFactoryOptions.DRIVER
Copyright © 2019. All rights reserved.