Top Description Fields Constructors Methods
io.micrometer.observation.transport

public Class ReceiverContext<C>

extends Context
Class Inheritance
Known Direct Subclasses
io.micrometer.observation.transport.RequestReplyReceiverContext
Type Parameters
<C>
type of the carrier object
Imports
io.micrometer.common.lang.NonNull, .Nullable, io.micrometer.observation.Observation, java.util.Objects

Context used when receiving data over the wire without requiring any confirmation to be sent to sender of the data.
Author
Marcin Grzejszczak
Since
1.10.0

Field Summary

Modifier and TypeField and Description
private C
private final Propagator.Getter<C>
private final Kind
private String
private String

Constructor Summary

AccessConstructor and Description
public
ReceiverContext(Propagator.Getter<C>
propagator getter
getter
,
Kind
kind
kind
)

Creates a new instance of ReceiverContext.

public
ReceiverContext(Propagator.Getter<C>
propagator getter
getter
)

Creates a new instance of a Kind#CONSUMER ReceiverContext.

Method Summary

Modifier and TypeMethod and Description
public C
public Propagator.Getter<C>
public Kind
public String

Returns:

optional address for the service that will be called
getRemoteServiceAddress
()

Return optional address for the service that will be called.

public String

Returns:

optional name for the service from which the message is polled
getRemoteServiceName
()

Return optional name for the service from which the message is polled.

public void
setCarrier(C carrier)

public void
setRemoteServiceAddress(String
service address for the service that will be called
remoteServiceAddress
)

Set optional service address for the service that will be called.

public void
setRemoteServiceName(String
name of the service from which the message is polled
remoteServiceName
)

Set optional name for the service from which the message is polled.

Inherited from io.micrometer.observation.Observation.Context:
addHighCardinalityKeyValueaddHighCardinalityKeyValuesaddLowCardinalityKeyValueaddLowCardinalityKeyValuesclearcomputeIfAbsentcontainsKeygetgetAllKeyValuesgetContextualNamegetErrorgetHighCardinalityKeyValuegetHighCardinalityKeyValuesgetLowCardinalityKeyValuegetLowCardinalityKeyValuesgetNamegetOrDefaultgetParentObservationgetRequiredputremoveremoveHighCardinalityKeyValueremoveHighCardinalityKeyValuesremoveLowCardinalityKeyValueremoveLowCardinalityKeyValuessetContextualNamesetErrorsetNamesetParentObservationtoString

Field Detail

carrierback to summary
private C carrier
getterback to summary
private final Propagator.Getter<C> getter
kindback to summary
private final Kind kind
remoteServiceAddressback to summary
private String remoteServiceAddress
Annotations
@Nullable
remoteServiceNameback to summary
private String remoteServiceName
Annotations
@Nullable

Constructor Detail

ReceiverContextback to summary
public ReceiverContext(Propagator.Getter<C> getter, Kind kind)

Creates a new instance of ReceiverContext.

Parameters
getter:Propagator.Getter<C>

propagator getter

kind:Kind

kind

ReceiverContextback to summary
public ReceiverContext(Propagator.Getter<C> getter)

Creates a new instance of a Kind#CONSUMER ReceiverContext.

Parameters
getter:Propagator.Getter<C>

propagator getter

Method Detail

getCarrierback to summary
public C getCarrier()
getGetterback to summary
public Propagator.Getter<C> getGetter()
getKindback to summary
public Kind getKind()
getRemoteServiceAddressback to summary
public String getRemoteServiceAddress()

Return optional address for the service that will be called.

Returns:String

optional address for the service that will be called

Annotations
@Nullable
getRemoteServiceNameback to summary
public String getRemoteServiceName()

Return optional name for the service from which the message is polled.

Returns:String

optional name for the service from which the message is polled

Annotations
@Nullable
setCarrierback to summary
public void setCarrier(C carrier)
setRemoteServiceAddressback to summary
public void setRemoteServiceAddress(String remoteServiceAddress)

Set optional service address for the service that will be called.

Parameters
remoteServiceAddress:String

service address for the service that will be called

setRemoteServiceNameback to summary
public void setRemoteServiceName(String remoteServiceName)

Set optional name for the service from which the message is polled.

Parameters
remoteServiceName:String

name of the service from which the message is polled