Package com.azure.core.util
Class Contexts
java.lang.Object
com.azure.core.util.Contexts
A utility type that can be used to add and retrieve instances commonly used in
Context.-
Method Summary
Modifier and TypeMethodDescriptionstatic Contextsempty()Returns a version of theContextreflecting mutations.Retrieves request'sProgressReporterfrom theContext.setHttpRequestProgressReporter(ProgressReporter progressReporter) Adds request'sProgressReporterinstance to theContext.static Contexts
-
Method Details
-
empty
- Returns:
- The
Contextsinstance.
-
with
- Parameters:
context- ExistingContext. Must not be null.- Returns:
- The
Contextsinstance. - Throws:
NullPointerException- Ifcontextis null.
-
setHttpRequestProgressReporter
Adds request'sProgressReporterinstance to theContext.- Parameters:
progressReporter- TheProgressReporterinstance.- Returns:
- Itself.
-
getHttpRequestProgressReporter
Retrieves request'sProgressReporterfrom theContext.- Returns:
- The
ProgressReporter.
-
getContext
Returns a version of theContextreflecting mutations.- Returns:
- The version of the
Contextreflecting mutations.
-