Enum Jdk8AsyncOperationEndStrategy
java.lang.Object
java.lang.Enum<Jdk8AsyncOperationEndStrategy>
io.opentelemetry.instrumentation.api.annotation.support.async.Jdk8AsyncOperationEndStrategy
- All Implemented Interfaces:
AsyncOperationEndStrategy,Serializable,Comparable<Jdk8AsyncOperationEndStrategy>,java.lang.constant.Constable
public enum Jdk8AsyncOperationEndStrategy
extends Enum<Jdk8AsyncOperationEndStrategy>
implements AsyncOperationEndStrategy
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescription<REQUEST,RESPONSE>
Objectend(io.opentelemetry.instrumentation.api.instrumenter.Instrumenter<REQUEST, RESPONSE> instrumenter, io.opentelemetry.context.Context context, REQUEST request, Object asyncValue, Class<RESPONSE> responseType) Composes overasyncValueand delays theInstrumenter.end(Context, Object, Object, Throwable)call until after the asynchronous operation represented byasyncValuecompletes.booleanReturns true for every asynchronous computation typeasyncTypethis strategy supports.Returns the enum constant of this type with the specified name.static Jdk8AsyncOperationEndStrategy[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
INSTANCE
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
supports
Description copied from interface:AsyncOperationEndStrategyReturns true for every asynchronous computation typeasyncTypethis strategy supports.- Specified by:
supportsin interfaceAsyncOperationEndStrategy
-
end
public <REQUEST,RESPONSE> Object end(io.opentelemetry.instrumentation.api.instrumenter.Instrumenter<REQUEST, RESPONSE> instrumenter, io.opentelemetry.context.Context context, REQUEST request, Object asyncValue, Class<RESPONSE> responseType) Description copied from interface:AsyncOperationEndStrategyComposes overasyncValueand delays theInstrumenter.end(Context, Object, Object, Throwable)call until after the asynchronous operation represented byasyncValuecompletes.- Specified by:
endin interfaceAsyncOperationEndStrategy- Parameters:
instrumenter- TheInstrumenterto be used to end the operation stored in thecontext.asyncValue- Return value from the instrumented method. Must be an instance of aasyncTypefor whichAsyncOperationEndStrategy.supports(Class)returned true (in particular it must not benull).responseType- Expected type of the response that should be obtained from theasyncValue. If the result of the async computation is instance of the passed type it will be passed when theinstrumenteris called.- Returns:
- Either
asyncValueor a value composing overasyncValuefor notification of completion.
-