Uses of Class
com.azure.core.util.Context
Packages that use Context
Package
Description
Package containing HTTP abstractions between the AnnotationParser, RestProxy, and HTTP client.
Package containing HttpPipelinePolicy interface and its implementations.
Package containing REST-related APIs.
Package containing core utility classes.
Package containing core utility classes.
Package containing API for long running operations.
Package containing API for tracing.
-
Uses of Context in com.azure.core.http
Methods in com.azure.core.http that return ContextModifier and TypeMethodDescriptionHttpPipelineCallContext.getContext()Gets the context associated to the HTTP call.Methods in com.azure.core.http with parameters of type ContextModifier and TypeMethodDescriptiondefault Mono<HttpResponse>HttpClient.send(HttpRequest request, Context context) Sends the provided request asynchronously with contextual information.HttpPipeline.send(HttpRequest request, Context data) Wraps the request in a context with additional metadata and sends it through the pipeline.default HttpResponseHttpClient.sendSync(HttpRequest request, Context context) Sends the provided request synchronously with contextual information.HttpPipeline.sendSync(HttpRequest request, Context data) Wraps the request in a context with additional metadata and sends it through the pipeline. -
Uses of Context in com.azure.core.http.policy
Methods in com.azure.core.http.policy that return ContextModifier and TypeMethodDescriptionHttpRequestLoggingContext.getContext()Gets the contextual information about the HTTP request.HttpResponseLoggingContext.getContext()Gets the contextual information about the HTTP response. -
Uses of Context in com.azure.core.http.rest
Methods in com.azure.core.http.rest that return ContextModifier and TypeMethodDescriptionRequestOptions.getContext()Gets the additional context on the request that is passed during the service call.Methods in com.azure.core.http.rest with parameters of type ContextModifier and TypeMethodDescriptionRestProxy.send(HttpRequest request, Context contextData) Send the provided request asynchronously, applying any request policies provided to the HttpClient instance.RequestOptions.setContext(Context context) Sets the additional context on the request that is passed during the service call. -
Uses of Context in com.azure.core.util
Fields in com.azure.core.util declared as ContextModifier and TypeFieldDescriptionstatic final ContextContext.NONESignifies that no data needs to be passed to the pipeline.Methods in com.azure.core.util that return ContextModifier and TypeMethodDescriptionContexts.getContext()Returns a version of theContextreflecting mutations.static ContextCoreUtils.mergeContexts(Context into, Context from) static ContextMethods in com.azure.core.util with parameters of type ContextModifier and TypeMethodDescriptionstatic <T> org.reactivestreams.Publisher<T>CoreUtils.extractAndFetch(PagedResponse<T> page, Context context, BiFunction<String, Context, org.reactivestreams.Publisher<T>> content) Deprecated.Use localized implementation.static ContextCoreUtils.mergeContexts(Context into, Context from) static ContextFluxUtil.toReactorContext(Context context) Converts an Azure context to Reactor context.static ContextsMethod parameters in com.azure.core.util with type arguments of type ContextModifier and TypeMethodDescriptionstatic <T> org.reactivestreams.Publisher<T>CoreUtils.extractAndFetch(PagedResponse<T> page, Context context, BiFunction<String, Context, org.reactivestreams.Publisher<T>> content) Deprecated.Use localized implementation.static <T> Flux<T>FluxUtil.fluxContext(Function<Context, Flux<T>> serviceCall) This method converts the incomingdeferContextualfromReactor ContexttoAzure Contextand calls the given lambda function with this context and returns a collection of typeTstatic <T> Mono<T>FluxUtil.withContext(Function<Context, Mono<T>> serviceCall) This method converts the incomingdeferContextualfromReactor ContexttoAzure Contextand calls the given lambda function with this context and returns a single entity of typeTstatic <T> Mono<T>This method converts the incomingdeferContextualfromReactor ContexttoAzure Context, adds the specified context attributes and calls the given lambda function with this context and returns a single entity of typeT -
Uses of Context in com.azure.core.util.metrics
Methods in com.azure.core.util.metrics with parameters of type ContextModifier and TypeMethodDescriptionvoidLongCounter.add(long value, TelemetryAttributes attributes, Context context) Records a value with a set of attributes.voidDoubleHistogram.record(double value, TelemetryAttributes attributes, Context context) Records a value with a set of attributes. -
Uses of Context in com.azure.core.util.polling
Constructors in com.azure.core.util.polling with parameters of type ContextModifierConstructorDescriptionDefaultPollingStrategy(HttpPipeline httpPipeline, JsonSerializer serializer, Context context) Creates a chained polling strategy with 3 known polling strategies,OperationResourcePollingStrategy,LocationPollingStrategy, andStatusCheckPollingStrategy, in this order, with a custom serializer.DefaultPollingStrategy(HttpPipeline httpPipeline, String endpoint, JsonSerializer serializer, Context context) Creates a chained polling strategy with 3 known polling strategies,OperationResourcePollingStrategy,LocationPollingStrategy, andStatusCheckPollingStrategy, in this order, with a custom serializer.LocationPollingStrategy(HttpPipeline httpPipeline, ObjectSerializer serializer, Context context) Creates an instance of the location polling strategy.LocationPollingStrategy(HttpPipeline httpPipeline, String endpoint, ObjectSerializer serializer, Context context) Creates an instance of the location polling strategy.OperationResourcePollingStrategy(HttpPipeline httpPipeline, ObjectSerializer serializer, String operationLocationHeaderName, Context context) Creates an instance of the operation resource polling strategy.OperationResourcePollingStrategy(HttpPipeline httpPipeline, String endpoint, ObjectSerializer serializer, String operationLocationHeaderName, Context context) Creates an instance of the operation resource polling strategy.SyncDefaultPollingStrategy(HttpPipeline httpPipeline, JsonSerializer serializer, Context context) Creates a synchronous chained polling strategy with three known polling strategies,SyncOperationResourcePollingStrategy,SyncLocationPollingStrategy, andSyncStatusCheckPollingStrategy, in this order, with a JSON serializer.SyncDefaultPollingStrategy(HttpPipeline httpPipeline, String endpoint, JsonSerializer serializer, Context context) Creates a synchronous chained polling strategy with three known polling strategies,SyncOperationResourcePollingStrategy,SyncLocationPollingStrategy, andSyncStatusCheckPollingStrategy, in this order, with a JSON serializer.SyncLocationPollingStrategy(HttpPipeline httpPipeline, ObjectSerializer serializer, Context context) Creates an instance of the location polling strategy.SyncLocationPollingStrategy(HttpPipeline httpPipeline, String endpoint, ObjectSerializer serializer, Context context) Creates an instance of the location polling strategy.SyncOperationResourcePollingStrategy(HttpPipeline httpPipeline, ObjectSerializer serializer, String operationLocationHeaderName, Context context) Creates an instance of the operation resource polling strategy.SyncOperationResourcePollingStrategy(HttpPipeline httpPipeline, String endpoint, ObjectSerializer serializer, String operationLocationHeaderName, Context context) Creates an instance of the operation resource polling strategy. -
Uses of Context in com.azure.core.util.tracing
Methods in com.azure.core.util.tracing that return ContextModifier and TypeMethodDescriptionTracer.extractContext(String diagnosticId, Context context) Extracts the span's context asContextfrom upstream.default ContextTracer.getSharedSpanBuilder(String spanName, Context context) Returns a span builder with the provided name inContext.Tracer.setSpanName(String spanName, Context context) Sets the name for spans that are created.static ContextTracerProxy.setSpanName(String spanName, Context context) Sets the span name for eachtracerplugged into the SDK.Creates a new tracing span.Tracer.start(String methodName, Context context, ProcessKind processKind) Creates a new tracing span for AMQP calls.default ContextTracer.start(String methodName, StartSpanOptions options, Context context) Creates a new tracing span.static ContextA new tracing span with INTERNAL kind is created for eachtracerplugged into the SDK.static ContextTracerProxy.start(String methodName, StartSpanOptions spanOptions, Context context) A new tracing span is created for eachtracerplugged into the SDK.Methods in com.azure.core.util.tracing with parameters of type ContextModifier and TypeMethodDescriptiondefault voidTracer.addEvent(String name, Map<String, Object> attributes, OffsetDateTime timestamp, Context context) Adds an event to the span present in theContextwith the providedtimestampandattributes.voidProvides a way to link multiple tracing spans.voidCompletes the current tracing span.voidCompletes the current tracing span for AMQP calls.static voidFor the plugged intracer, its current tracing span is marked as completed.Tracer.extractContext(String diagnosticId, Context context) Extracts the span's context asContextfrom upstream.default ContextTracer.getSharedSpanBuilder(String spanName, Context context) Returns a span builder with the provided name inContext.default AutoCloseableTracer.makeSpanCurrent(Context context) Makes span current.voidTracer.setAttribute(String key, String value, Context context) Adds metadata to the current span.static voidTracerProxy.setAttribute(String key, String value, Context context) For the plugged intracer, the key-value pair metadata is added to its current span.Tracer.setSpanName(String spanName, Context context) Sets the name for spans that are created.static ContextTracerProxy.setSpanName(String spanName, Context context) Sets the span name for eachtracerplugged into the SDK.Creates a new tracing span.Tracer.start(String methodName, Context context, ProcessKind processKind) Creates a new tracing span for AMQP calls.default ContextTracer.start(String methodName, StartSpanOptions options, Context context) Creates a new tracing span.static ContextA new tracing span with INTERNAL kind is created for eachtracerplugged into the SDK.static ContextTracerProxy.start(String methodName, StartSpanOptions spanOptions, Context context) A new tracing span is created for eachtracerplugged into the SDK.