Interface ConnectionCustomizer<C>
- Type Parameters:
C
- The connection type
- All Superinterfaces:
io.micronaut.core.order.Ordered
public interface ConnectionCustomizer<C>
extends io.micronaut.core.order.Ordered
Customizes connection before or after data repository call based on the provided
ConnectionStatus
.
Implementations of this interface can modify the behavior of connections created by Micronaut Data
or do what might be needed before or after call to the data repository (for example JDBC statement call).- Since:
- 4.11
- Author:
- radovanradic
- See Also:
-
Field Summary
Fields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Method Summary
Modifier and TypeMethodDescription<R> Function<ConnectionStatus<C>,
R> intercept
(Function<ConnectionStatus<C>, R> operation) Intercept the connection operation.Methods inherited from interface io.micronaut.core.order.Ordered
getOrder
-
Method Details
-
intercept
Intercept the connection operation.- Type Parameters:
R
- The result- Parameters:
operation
- The operation- Returns:
- the operation callback
-