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
-
Field Summary
Fields inherited from class io.opencensus.trace.propagation.BinaryFormat
NOOP_BINARY_FORMAT
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfromByteArray
(byte[] bytes) Parses theSpanContext
from a byte array using the binary format.byte[]
toByteArray
(SpanContext spanContext) Serializes aSpanContext
into a byte array using the binary format.Methods inherited from class io.opencensus.trace.propagation.BinaryFormat
fromBinaryValue, getNoopBinaryFormat, toBinaryValue
-
Constructor Details
-
NoopBinaryFormat
private NoopBinaryFormat()
-
-
Method Details
-
toByteArray
Description copied from class:BinaryFormat
Serializes aSpanContext
into a byte array using the binary format.- Overrides:
toByteArray
in classBinaryFormat
- Parameters:
spanContext
- theSpanContext
to serialize.- Returns:
- the serialized binary value.
-
fromByteArray
Description copied from class:BinaryFormat
Parses theSpanContext
from a byte array using the binary format.- Overrides:
fromByteArray
in classBinaryFormat
- Parameters:
bytes
- a binary encoded buffer from which theSpanContext
will be parsed.- Returns:
- the parsed
SpanContext
.
-