Enum Jdk8AsyncOperationEndStrategy

    • Method Detail

      • values

        public static Jdk8AsyncOperationEndStrategy[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Jdk8AsyncOperationEndStrategy c : Jdk8AsyncOperationEndStrategy.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Jdk8AsyncOperationEndStrategy valueOf​(String name)
        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 name
        NullPointerException - if the argument is null
      • 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: AsyncOperationEndStrategy
        Composes over asyncValue and delays the Instrumenter.end(Context, Object, Object, Throwable) call until after the asynchronous operation represented by asyncValue completes.
        Specified by:
        end in interface AsyncOperationEndStrategy
        Parameters:
        instrumenter - The Instrumenter to be used to end the operation stored in the context.
        asyncValue - Return value from the instrumented method. Must be an instance of a asyncType for which AsyncOperationEndStrategy.supports(Class) returned true (in particular it must not be null).
        responseType - Expected type of the response that should be obtained from the asyncValue. If the result of the async computation is instance of the passed type it will be passed when the instrumenter is called.
        Returns:
        Either asyncValue or a value composing over asyncValue for notification of completion.