@ProtoTypeId(value=2) public class MarshallableUserObject<T> extends Object
MarshallableUserObject.Marshaller
implementation, which delegates to the configured user marshaller in SerializationConfiguration
if it exists.
This abstraction hides the details of the configured user marshaller from our internal Pojos, so that all calls to
the configured user marshaller can be limited to the MarshallableUserObject.Marshaller
instance.
In order to allow this object to be utilised by our internal ProtoStream annotated Pojos, we need to generate the
proto schema for this object using the protostream-processor and AutoProtoSchemaBuilder
.
Consequently, it's necessary for the generated marshaller to be overridden, therefore calls to SerializationContext.registerMarshaller(BaseMarshaller)
must be made after the
registration of any generated SerializationContextInitializer
's that contain this
class. To ensure that the marshaller generated for this class is never used, we throw a IllegalStateException
if the ProtoFactory
constructor is called.
Modifier and Type | Class and Description |
---|---|
static class |
MarshallableUserObject.Marshaller |
Constructor and Description |
---|
MarshallableUserObject(T object) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
T |
get() |
int |
hashCode() |
static int |
size(int objectBytes) |
Copyright © 2021 JBoss by Red Hat. All rights reserved.