Class Marshaler
- java.lang.Object
-
- io.opentelemetry.exporter.internal.marshal.Marshaler
-
- Direct Known Subclasses:
LowAllocationLogsRequestMarshaler
,LowAllocationMetricsRequestMarshaler
,LowAllocationTraceRequestMarshaler
,MarshalerWithSize
public abstract class Marshaler extends java.lang.Object
Marshaler from an SDK structure to protobuf wire format.This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.
-
-
Constructor Summary
Constructors Constructor Description Marshaler()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract int
getBinarySerializedSize()
Returns the number of bytes this Marshaler will write in proto binary format.void
writeBinaryTo(java.io.OutputStream output)
Marshals into theOutputStream
in proto binary format.void
writeJsonTo(com.fasterxml.jackson.core.JsonGenerator output)
Marshals into theJsonGenerator
in proto JSON format.void
writeJsonTo(java.io.OutputStream output)
Marshals into theOutputStream
in proto JSON format.void
writeJsonWithNewline(com.fasterxml.jackson.core.JsonGenerator output)
Marshals into theJsonGenerator
in proto JSON format and adds a newline.protected abstract void
writeTo(Serializer output)
-
-
-
Method Detail
-
writeBinaryTo
public final void writeBinaryTo(java.io.OutputStream output) throws java.io.IOException
Marshals into theOutputStream
in proto binary format.- Throws:
java.io.IOException
-
writeJsonTo
public final void writeJsonTo(java.io.OutputStream output) throws java.io.IOException
Marshals into theOutputStream
in proto JSON format.- Throws:
java.io.IOException
-
writeJsonTo
public final void writeJsonTo(com.fasterxml.jackson.core.JsonGenerator output) throws java.io.IOException
Marshals into theJsonGenerator
in proto JSON format.- Throws:
java.io.IOException
-
writeJsonWithNewline
public final void writeJsonWithNewline(com.fasterxml.jackson.core.JsonGenerator output) throws java.io.IOException
Marshals into theJsonGenerator
in proto JSON format and adds a newline.- Throws:
java.io.IOException
-
getBinarySerializedSize
public abstract int getBinarySerializedSize()
Returns the number of bytes this Marshaler will write in proto binary format.
-
writeTo
protected abstract void writeTo(Serializer output) throws java.io.IOException
- Throws:
java.io.IOException
-
-