Class DelegatingConnectionFactory
java.lang.Object
org.springframework.r2dbc.connection.DelegatingConnectionFactory
- All Implemented Interfaces:
ConnectionFactory
,Wrapped<ConnectionFactory>
- Direct Known Subclasses:
SingleConnectionFactory
,TransactionAwareConnectionFactoryProxy
public class DelegatingConnectionFactory
extends Object
implements ConnectionFactory, Wrapped<ConnectionFactory>
R2DBC
ConnectionFactory
implementation that delegates
all calls to a given target ConnectionFactory
.
This class is meant to be subclassed, with subclasses overriding
only those methods (such as create()
) that should not simply
delegate to the target ConnectionFactory
.
- Since:
- 5.3
- Author:
- Mark Paluch
- See Also:
-
Constructor Summary
ConstructorDescriptionDelegatingConnectionFactory
(ConnectionFactory targetConnectionFactory) Create a new DelegatingConnectionFactory. -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<? extends Connection>
create()
Return the target ConnectionFactory that this ConnectionFactory delegates to.unwrap()
-
Constructor Details
-
DelegatingConnectionFactory
Create a new DelegatingConnectionFactory.- Parameters:
targetConnectionFactory
- the target ConnectionFactory
-
-
Method Details
-
getTargetConnectionFactory
Return the target ConnectionFactory that this ConnectionFactory delegates to. -
create
- Specified by:
create
in interfaceConnectionFactory
-
getMetadata
- Specified by:
getMetadata
in interfaceConnectionFactory
-
unwrap
- Specified by:
unwrap
in interfaceWrapped<ConnectionFactory>
-