Interface InstrumentationContext<T>
-
- All Known Subinterfaces:
ExecuteObjectInstrumentationContext
,ExecutionStrategyInstrumentationContext
,FieldFetchingInstrumentationContext
- All Known Implementing Classes:
SimpleInstrumentationContext
@PublicSpi public interface InstrumentationContext<T>
When aInstrumentation
.'beginXXX()' method is called then it must return a non null InstrumentationContext that will be invoked when the step is first dispatched and then when it completes. Sometimes this is effectively the same time whereas at other times its when an asynchronousCompletableFuture
completes. This pattern of construction of an object then call back is intended to allow "timers" to be created that can instrument what has just happened or "loggers" to be called to record what has happened.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onCompleted(T result, java.lang.Throwable t)
This is invoked when the instrumentation step is fully completedvoid
onDispatched()
This is invoked when the instrumentation step is initially dispatched
-
-
-
Method Detail
-
onDispatched
void onDispatched()
This is invoked when the instrumentation step is initially dispatched
-
onCompleted
void onCompleted(T result, java.lang.Throwable t)
This is invoked when the instrumentation step is fully completed- Parameters:
result
- the result of the step (which may be null)t
- this exception will be non null if an exception was thrown during the step
-
-