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

public Class SenderContext<C>

extends Context
Class Inheritance
Known Direct Subclasses
io.micrometer.observation.transport.RequestReplySenderContext
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 sending data over the wire in a fire and forget fashion.
Author
Marcin Grzejszczak
Since
1.10.0

Field Summary

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

Constructor Summary

AccessConstructor and Description
public
SenderContext(Propagator.Setter<C>
propagator setter
setter
,
Kind
kind
kind
)

Creates a new instance of SenderContext.

public
SenderContext(Propagator.Setter<C>
propagator setter
setter
)

Creates a new instance of a Kind#PRODUCER SenderContext.

Method Summary

Modifier and TypeMethod and Description
public 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 that will be called
getRemoteServiceName
()

Return optional name for the service that will be called.

public Propagator.Setter<C>
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 that will be called
remoteServiceName
)

Set optional name for the service that will be called.

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

Field Detail

carrierback to summary
private C carrier
Annotations
@Nullable
kindback to summary
private final Kind kind
remoteServiceAddressback to summary
private String remoteServiceAddress
Annotations
@Nullable
remoteServiceNameback to summary
private String remoteServiceName
Annotations
@Nullable
setterback to summary
private final Propagator.Setter<C> setter

Constructor Detail

SenderContextback to summary
public SenderContext(Propagator.Setter<C> setter, Kind kind)

Creates a new instance of SenderContext.

Parameters
setter:Propagator.Setter<C>

propagator setter

kind:Kind

kind

SenderContextback to summary
public SenderContext(Propagator.Setter<C> setter)

Creates a new instance of a Kind#PRODUCER SenderContext.

Parameters
setter:Propagator.Setter<C>

propagator setter

Method Detail

getCarrierback to summary
public C getCarrier()
Annotations
@Nullable
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 that will be called.

Returns:String

optional name for the service that will be called

Annotations
@Nullable
getSetterback to summary
public Propagator.Setter<C> getSetter()
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 that will be called.

Parameters
remoteServiceName:String

name of the service that will be called