Class RequestReplySenderContext<C,RES>
java.lang.Object
io.micrometer.observation.Observation.Context
io.micrometer.observation.transport.SenderContext<C>
io.micrometer.observation.transport.RequestReplySenderContext<C,RES>
- Type Parameters:
C- type of the carrier objectRES- type of the response object
- All Implemented Interfaces:
Observation.ContextView,ResponseContext<RES>
public class RequestReplySenderContext<C,RES>
extends SenderContext<C>
implements ResponseContext<RES>
Context used when sending data over the wire with the idea that you'll wait for some
response from the recipient.
- Since:
- 1.10.0
-
Constructor Summary
ConstructorsConstructorDescriptionRequestReplySenderContext(Propagator.Setter<C> setter) Creates a new instance of aKind.CLIENTRequestReplySenderContext.RequestReplySenderContext(Propagator.Setter<C> setter, Kind kind) Creates a new instance ofRequestReplySenderContext. -
Method Summary
Modifier and TypeMethodDescriptionGetter for the response object.voidsetResponse(RES response) Setter for the response object.Methods inherited from class io.micrometer.observation.transport.SenderContext
getCarrier, getKind, getRemoteServiceAddress, getRemoteServiceName, getSetter, setCarrier, setRemoteServiceAddress, setRemoteServiceNameMethods inherited from class io.micrometer.observation.Observation.Context
addHighCardinalityKeyValue, addHighCardinalityKeyValues, addLowCardinalityKeyValue, addLowCardinalityKeyValues, clear, computeIfAbsent, containsKey, get, getAllKeyValues, getContextualName, getError, getHighCardinalityKeyValue, getHighCardinalityKeyValues, getLowCardinalityKeyValue, getLowCardinalityKeyValues, getName, getOrDefault, getParentObservation, getRequired, put, remove, removeHighCardinalityKeyValue, removeHighCardinalityKeyValues, removeLowCardinalityKeyValue, removeLowCardinalityKeyValues, setContextualName, setError, setName, setParentObservation, toString
-
Constructor Details
-
RequestReplySenderContext
Creates a new instance ofRequestReplySenderContext.- Parameters:
setter- propagator setterkind- kind
-
RequestReplySenderContext
Creates a new instance of aKind.CLIENTRequestReplySenderContext.- Parameters:
setter- propagator setter
-
-
Method Details
-
getResponse
Description copied from interface:ResponseContextGetter for the response object.- Specified by:
getResponsein interfaceResponseContext<C>- Returns:
- the response
-
setResponse
Description copied from interface:ResponseContextSetter for the response object.- Specified by:
setResponsein interfaceResponseContext<C>- Parameters:
response- the response
-