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 Contexts
empty()
Returns a version of theContext
reflecting mutations.Retrieves request'sProgressReporter
from theContext
.setHttpRequestProgressReporter
(ProgressReporter progressReporter) Adds request'sProgressReporter
instance to theContext
.static Contexts
-
Method Details
-
empty
- Returns:
- The
Contexts
instance.
-
with
- Parameters:
context
- ExistingContext
. Must not be null.- Returns:
- The
Contexts
instance. - Throws:
NullPointerException
- Ifcontext
is null.
-
setHttpRequestProgressReporter
Adds request'sProgressReporter
instance to theContext
.- Parameters:
progressReporter
- TheProgressReporter
instance.- Returns:
- Itself.
-
getHttpRequestProgressReporter
Retrieves request'sProgressReporter
from theContext
.- Returns:
- The
ProgressReporter
.
-
getContext
Returns a version of theContext
reflecting mutations.- Returns:
- The version of the
Context
reflecting mutations.
-