Class ConnectionDetailsFactories
java.lang.Object
org.springframework.boot.autoconfigure.service.connection.ConnectionDetailsFactories
A registry of
ConnectionDetailsFactory
instances.- Since:
- 3.1.0
- Author:
- Moritz Halbritter, Andy Wilkinson, Phillip Webb
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<S> Map<Class<?>,
ConnectionDetails> getConnectionDetails
(S source, boolean required) Return aMap
ofConnectionDetails
interface type toConnectionDetails
instance created from the factories associated with the given source.
-
Constructor Details
-
ConnectionDetailsFactories
public ConnectionDetailsFactories()
-
-
Method Details
-
getConnectionDetails
public <S> Map<Class<?>,ConnectionDetails> getConnectionDetails(S source, boolean required) throws ConnectionDetailsFactoryNotFoundException, ConnectionDetailsNotFoundException Return aMap
ofConnectionDetails
interface type toConnectionDetails
instance created from the factories associated with the given source.- Type Parameters:
S
- the source type- Parameters:
source
- the sourcerequired
- if a connection details result is required- Returns:
- a map of
ConnectionDetails
instances - Throws:
ConnectionDetailsFactoryNotFoundException
- if a result is required but no connection details factory is registered for the sourceConnectionDetailsNotFoundException
- if a result is required but no connection details instance was created from a registered factory
-