Package io.opencensus.trace.propagation
Class BinaryFormat.NoopBinaryFormat
- java.lang.Object
-
- io.opencensus.trace.propagation.BinaryFormat
-
- io.opencensus.trace.propagation.BinaryFormat.NoopBinaryFormat
-
- Enclosing class:
- BinaryFormat
private static final class BinaryFormat.NoopBinaryFormat extends BinaryFormat
-
-
Field Summary
-
Fields inherited from class io.opencensus.trace.propagation.BinaryFormat
NOOP_BINARY_FORMAT
-
-
Constructor Summary
Constructors Modifier Constructor Description privateNoopBinaryFormat()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SpanContextfromByteArray(byte[] bytes)Parses theSpanContextfrom a byte array using the binary format.byte[]toByteArray(SpanContext spanContext)Serializes aSpanContextinto a byte array using the binary format.-
Methods inherited from class io.opencensus.trace.propagation.BinaryFormat
fromBinaryValue, getNoopBinaryFormat, toBinaryValue
-
-
-
-
Method Detail
-
toByteArray
public byte[] toByteArray(SpanContext spanContext)
Description copied from class:BinaryFormatSerializes aSpanContextinto a byte array using the binary format.- Overrides:
toByteArrayin classBinaryFormat- Parameters:
spanContext- theSpanContextto serialize.- Returns:
- the serialized binary value.
-
fromByteArray
public SpanContext fromByteArray(byte[] bytes)
Description copied from class:BinaryFormatParses theSpanContextfrom a byte array using the binary format.- Overrides:
fromByteArrayin classBinaryFormat- Parameters:
bytes- a binary encoded buffer from which theSpanContextwill be parsed.- Returns:
- the parsed
SpanContext.
-
-