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.ObjectMarshaler 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 intgetBinarySerializedSize()Returns the number of bytes this Marshaler will write in proto binary format.voidwriteBinaryTo(java.io.OutputStream output)Marshals into theOutputStreamin proto binary format.voidwriteJsonTo(com.fasterxml.jackson.core.JsonGenerator output)Marshals into theJsonGeneratorin proto JSON format.voidwriteJsonTo(java.io.OutputStream output)Marshals into theOutputStreamin proto JSON format.voidwriteJsonWithNewline(com.fasterxml.jackson.core.JsonGenerator output)Marshals into theJsonGeneratorin proto JSON format and adds a newline.protected abstract voidwriteTo(Serializer output)
-
-
-
Method Detail
-
writeBinaryTo
public final void writeBinaryTo(java.io.OutputStream output) throws java.io.IOExceptionMarshals into theOutputStreamin proto binary format.- Throws:
java.io.IOException
-
writeJsonTo
public final void writeJsonTo(java.io.OutputStream output) throws java.io.IOExceptionMarshals into theOutputStreamin proto JSON format.- Throws:
java.io.IOException
-
writeJsonTo
public final void writeJsonTo(com.fasterxml.jackson.core.JsonGenerator output) throws java.io.IOExceptionMarshals into theJsonGeneratorin proto JSON format.- Throws:
java.io.IOException
-
writeJsonWithNewline
public final void writeJsonWithNewline(com.fasterxml.jackson.core.JsonGenerator output) throws java.io.IOExceptionMarshals into theJsonGeneratorin 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
-
-