public interface ProxyExecutionListener
Modifier and Type | Method and Description |
---|---|
default void |
afterMethod(MethodExecutionInfo executionInfo)
Called after every invocation of methods.
|
default void |
afterQuery(QueryExecutionInfo execInfo)
Called after executing a query (
Batch.execute() or Statement.execute() ). |
default void |
beforeMethod(MethodExecutionInfo executionInfo)
Called before every invocation of methods.
|
default void |
beforeQuery(QueryExecutionInfo execInfo)
Called before executing a query (
Batch.execute() or Statement.execute() ). |
default void |
eachQueryResult(QueryExecutionInfo execInfo)
Called on processing each query
Result . |
default void beforeMethod(MethodExecutionInfo executionInfo)
Exception Handling:
Exceptions thrown by this method are dropped and do not affect the original subscription's publisher flow.
Such exceptions are reported to Hooks.onErrorDropped(java.util.function.Consumer)
.
executionInfo
- method execution contextdefault void afterMethod(MethodExecutionInfo executionInfo)
Exception Handling:
Exceptions thrown by this method are dropped and do not affect the original subscription's publisher flow.
Such exceptions are reported to Hooks.onErrorDropped(java.util.function.Consumer)
.
executionInfo
- method execution contextdefault void beforeQuery(QueryExecutionInfo execInfo)
Batch.execute()
or Statement.execute()
).
Note: this callback is called when the publisher, result of the execute()
, is being
subscribed. Not at the time of execute()
is called,
Exception Handling:
Exceptions thrown by this method are dropped and do not affect the original subscription's publisher flow.
Such exceptions are reported to Hooks.onErrorDropped(java.util.function.Consumer)
.
execInfo
- query execution contextdefault void afterQuery(QueryExecutionInfo execInfo)
Batch.execute()
or Statement.execute()
).
The callback order is:
beforeQuery(QueryExecutionInfo)
eachQueryResult(QueryExecutionInfo)
for 1st result
eachQueryResult(QueryExecutionInfo)
for 2nd result
eachQueryResult(QueryExecutionInfo)
for Nth result
afterQuery(QueryExecutionInfo)
QueryExecutionInfo.getExecuteDuration()
is available in this callback and it holds
the duration since beforeQuery(QueryExecutionInfo)
.
Note: this callback is called when the publisher, result of the execute()
, is being
subscribed. Not at the time of execute()
is called,
Exception Handling:
Exceptions thrown by this method are dropped and do not affect the original subscription's publisher flow.
Such exceptions are reported to Hooks.onErrorDropped(java.util.function.Consumer)
.
execInfo
- query execution contextdefault void eachQueryResult(QueryExecutionInfo execInfo)
Result
.
While processing query results Result
, this callback
is called per result.
QueryExecutionInfo.getCurrentMappedResult()
contains the mapped result.
Exception Handling:
Exceptions thrown by this method are dropped and do not affect the original subscription's publisher flow.
Such exceptions are reported to Hooks.onErrorDropped(java.util.function.Consumer)
.
execInfo
- query execution contextCopyright © 2025. All rights reserved.