java.lang.Object
io.helidon.dbclient.common.DbClientServiceBase
- All Implemented Interfaces:
DbClientService
- Direct Known Subclasses:
DbClientTracing
A base implementation of a client service that supports configuration
of execution based on a statement name pattern and statement types.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
DbClientServiceBase.DbClientServiceBuilderBase<B extends DbClientServiceBase.DbClientServiceBuilderBase<B>>
A base class for builders ofDbClientServiceBase
. -
Constructor Summary
ModifierConstructorDescriptionprotected
Create a new instance based on the builder base each implementation must extend. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract Single<DbClientServiceContext>
apply
(DbClientServiceContext context) This method is only invoked if the predicate for this service was passed.final Single<DbClientServiceContext>
statement
(DbClientServiceContext context) Statement execution to be intercepted.
-
Constructor Details
-
DbClientServiceBase
Create a new instance based on the builder base each implementation must extend.- Parameters:
builder
- builder to configure predicate to use
-
-
Method Details
-
statement
Description copied from interface:DbClientService
Statement execution to be intercepted. This method is called before the statement execution starts. If there is no need to modify the context and you do not block, returnSingle.just(context)
.- Specified by:
statement
in interfaceDbClientService
- Parameters:
context
- Context to access data needed to process an interceptor- Returns:
- single that completes when this service is finished
-
apply
This method is only invoked if the predicate for this service was passed.- Parameters:
context
- db client invocation context- Returns:
- single with the new context (or the same one if not modified)
- See Also:
-