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.CLIENT
RequestReplySenderContext
.RequestReplySenderContext
(Propagator.Setter<C> setter, Kind kind) Creates a new instance ofRequestReplySenderContext
. -
Method Summary
Modifier and TypeMethodDescriptionGetter for the response object.void
setResponse
(RES response) Setter for the response object.Methods inherited from class io.micrometer.observation.transport.SenderContext
getCarrier, getKind, getRemoteServiceAddress, getRemoteServiceName, getSetter, setCarrier, setRemoteServiceAddress, setRemoteServiceName
Methods 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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.micrometer.observation.Observation.ContextView
getOrDefault
-
Constructor Details
-
RequestReplySenderContext
Creates a new instance ofRequestReplySenderContext
.- Parameters:
setter
- propagator setterkind
- kind
-
RequestReplySenderContext
Creates a new instance of aKind.CLIENT
RequestReplySenderContext
.- Parameters:
setter
- propagator setter
-
-
Method Details
-
getResponse
Description copied from interface:ResponseContext
Getter for the response object.- Specified by:
getResponse
in interfaceResponseContext<C>
- Returns:
- the response
-
setResponse
Description copied from interface:ResponseContext
Setter for the response object.- Specified by:
setResponse
in interfaceResponseContext<C>
- Parameters:
response
- the response
-