final class RawProtobufMarshallerDelegate<T> extends java.lang.Object implements BaseMarshallerDelegate<T>
| Modifier and Type | Field and Description |
|---|---|
private SerializationContextImpl |
ctx |
private RawProtobufMarshaller<T> |
marshaller |
| Constructor and Description |
|---|
RawProtobufMarshallerDelegate(SerializationContextImpl ctx,
RawProtobufMarshaller<T> marshaller) |
| Modifier and Type | Method and Description |
|---|---|
RawProtobufMarshaller<T> |
getMarshaller()
Gets the wrapped marshaller.
|
void |
marshall(FieldDescriptor fieldDescriptor,
T value,
ProtoStreamWriterImpl writer,
RawProtoStreamWriter out)
Marshalls an object.
|
T |
unmarshall(FieldDescriptor fieldDescriptor,
ProtoStreamReaderImpl reader,
RawProtoStreamReader in)
Unmarshalls an object.
|
private final RawProtobufMarshaller<T> marshaller
private final SerializationContextImpl ctx
public RawProtobufMarshallerDelegate(SerializationContextImpl ctx, RawProtobufMarshaller<T> marshaller)
public RawProtobufMarshaller<T> getMarshaller()
BaseMarshallerDelegategetMarshaller in interface BaseMarshallerDelegate<T>public void marshall(FieldDescriptor fieldDescriptor, T value, ProtoStreamWriterImpl writer, RawProtoStreamWriter out) throws java.io.IOException
BaseMarshallerDelegatemarshall in interface BaseMarshallerDelegate<T>fieldDescriptor - the FieldDescriptor of the field being marshalled or null if this is a
top-level objectvalue - the value being marshalled (cannot be null)writer - the ProtoStreamWriterImpl instance to use/re-use, if the specific marshaller type
needs one; can be null in which case the delegate has to create a ProtoStreamWriterImpl instance itself based on the out parameterout - the Protobuf tag output stream (cannot be null)java.io.IOException - if marshalling fails for some reasonpublic T unmarshall(FieldDescriptor fieldDescriptor, ProtoStreamReaderImpl reader, RawProtoStreamReader in) throws java.io.IOException
BaseMarshallerDelegateunmarshall in interface BaseMarshallerDelegate<T>fieldDescriptor - the FieldDescriptor of the field being unmarshalled or null if this is a
top-level objectreader - the ProtoStreamReaderImpl instance to use/re-use, if the specific marshaller type
needs one; can be null in which case the delegate has to create a ProtoStreamReaderImpl instance itself based on the in parameterin - the Protobuf tag input stream (cannot be null)java.io.IOException - if unmarshalling fails for some reason