Uses of Class
com.azure.core.util.Context
Packages that use Context
Package
Description
This package provides HTTP abstractions for Azure SDK client libraries.
This package contains the HttpPipelinePolicy interface and its implementations.
This package contains classes and interfaces that provide RESTful HTTP functionality for Azure SDKs.
Package containing core utility classes.
Package containing core utility classes.
This package contains utility classes and interfaces for handling long-running operations in the
Azure client libraries.
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
Methods in com.azure.core.util.polling that return ContextModifier and TypeMethodDescriptionPollingStrategyOptions.getContext()Returns the context to use for sending the request using thePollingStrategyOptions.getHttpPipeline().Methods in com.azure.core.util.polling with parameters of type ContextModifier and TypeMethodDescriptionPollingStrategyOptions.setContext(Context context) Sets the context to use for sending the request using thePollingStrategyOptions.getHttpPipeline().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 TypeMethodDescriptiondefault ContextTracer.extractContext(String diagnosticId, Context context) Deprecated.default ContextTracer.extractContext(Function<String, String> headerGetter) Extracts the span's context asContextfrom upstream.TracingLink.getContext()Gets linked contextStartSpanOptions.getRemoteParent()Gets remote parent.default ContextTracer.getSharedSpanBuilder(String spanName, Context context) Deprecated.useStartSpanOptions.addLink(TracingLink)insteaddefault ContextTracer.setSpanName(String spanName, Context context) Deprecated.not needed.static ContextTracerProxy.setSpanName(String spanName, Context context) Deprecated.Sets the span name for eachtracerplugged into the SDK.Creates a new tracing span.default ContextTracer.start(String spanName, Context context, ProcessKind processKind) Deprecated.useTracer.start(String, StartSpanOptions, Context)instead.default ContextTracer.start(String methodName, StartSpanOptions options, Context context) Creates a new tracing span.static ContextDeprecated.A new tracing span with INTERNAL kind is created for eachtracerplugged into the SDK.static ContextTracerProxy.start(String methodName, StartSpanOptions spanOptions, Context context) Deprecated.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.default voidDeprecated.default voidDeprecated.set specific attribute e.g. http_status_code explicitly and useTracer.end(String, Throwable, Context).voidCompletes span on the context.static voidDeprecated.For the plugged intracer, its current tracing span is marked as completed.default ContextTracer.extractContext(String diagnosticId, Context context) Deprecated.default ContextTracer.getSharedSpanBuilder(String spanName, Context context) Deprecated.useStartSpanOptions.addLink(TracingLink)insteaddefault voidTracer.injectContext(BiConsumer<String, String> headerSetter, Context context) Injects tracing context.default booleanTracer.isRecording(Context span) Checks if span is sampled in.default AutoCloseableTracer.makeSpanCurrent(Context context) Makes span current.default voidTracer.setAttribute(String key, long value, Context context) Sets long attribute.default voidTracer.setAttribute(String key, Object value, Context context) Sets an attribute on span.voidTracer.setAttribute(String key, String value, Context context) Adds metadata to the current span.static voidTracerProxy.setAttribute(String key, String value, Context context) Deprecated.For the plugged intracer, the key-value pair metadata is added to its current span.StartSpanOptions.setRemoteParent(Context parent) Sets remote parent context.default ContextTracer.setSpanName(String spanName, Context context) Deprecated.not needed.static ContextTracerProxy.setSpanName(String spanName, Context context) Deprecated.Sets the span name for eachtracerplugged into the SDK.Creates a new tracing span.default ContextTracer.start(String spanName, Context context, ProcessKind processKind) Deprecated.useTracer.start(String, StartSpanOptions, Context)instead.default ContextTracer.start(String methodName, StartSpanOptions options, Context context) Creates a new tracing span.static ContextDeprecated.A new tracing span with INTERNAL kind is created for eachtracerplugged into the SDK.static ContextTracerProxy.start(String methodName, StartSpanOptions spanOptions, Context context) Deprecated.A new tracing span is created for eachtracerplugged into the SDK.Constructors in com.azure.core.util.tracing with parameters of type ContextModifierConstructorDescriptionTracingLink(Context context) Creates link traces without attributesTracingLink(Context context, Map<String, Object> attributes) Creates link with attributes.