Class RequestReplyReceiverContext<C,RES>
java.lang.Object
io.micrometer.observation.Observation.Context
io.micrometer.observation.transport.ReceiverContext<C>
io.micrometer.observation.transport.RequestReplyReceiverContext<C,RES>
- Type Parameters:
C- type of the carrier objectRES- type of the response object
- All Implemented Interfaces:
Observation.ContextView, ResponseContext<RES>
public class RequestReplyReceiverContext<C,RES>
extends ReceiverContext<C>
implements ResponseContext<RES>
Context used when receiving data over the wire with confirmation to be sent to sender
of the data.
- Since:
- 1.10.0
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance ofKind.SERVERRequestReplyReceiverContext.RequestReplyReceiverContext(Propagator.Getter<C> getter, Kind kind) Creates a new instance ofRequestReplyReceiverContext. -
Method Summary
Modifier and TypeMethodDescription@Nullable RESGetter for the response object.voidsetResponse(RES response) Setter for the response object.Methods inherited from class ReceiverContext
getCarrier, getGetter, getKind, getRemoteServiceAddress, getRemoteServiceName, setCarrier, setRemoteServiceAddress, setRemoteServiceNameMethods inherited from class 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, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Observation.ContextView
getOrDefault
-
Constructor Details
-
RequestReplyReceiverContext
Creates a new instance ofRequestReplyReceiverContext.- Parameters:
getter- propagator getterkind- kind
-
RequestReplyReceiverContext
Creates a new instance ofKind.SERVERRequestReplyReceiverContext.- Parameters:
getter- propagator getter
-
-
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
-