public interface SerializationContextInitializer
AutoProtoSchemaBuilder
annotation. By creating an abstract class implementing this interface or an interface extending it and annotating it
with AutoProtoSchemaBuilder the compiler (via a custom annotation
processor) will generate a concrete implementation for you to use. The implementation will provide a single schema
file that is generated based on the annotations and also marshallers for all the contained types.
You can also use the sub-interface GeneratedSchema instead, which provides methods to access the generated
schema file.
Manually written implementations of these interfaces are allowed, but are of no special use with regard to ProtoStream library.
This mechanism is very similar to ProtoSchemaBuilder which works using
bytecode generation at runtime instead of compile time.
NOTE: Methods getProtoFileName() and getProtoFile() will be removed from this interface in
ver. 5 but will continue to exist in GeneratedSchema, which extends this interface.
| Modifier and Type | Method and Description |
|---|---|
String |
getProtoFile()
Deprecated.
in 4.3.4, to be removed in 5. The method was moved and will continue to exist starting with ver. 5
as
GeneratedSchema.getProtoFile(). See IPROTO-154. |
String |
getProtoFileName()
Deprecated.
in 4.3.4, to be removed in 5. The method was moved and will continue to exist starting with ver. 5
as
GeneratedSchema.getProtoFileName(). See IPROTO-154. |
void |
registerMarshallers(SerializationContext serCtx)
Registers marshallers to the given
SerializationContext.This is always invoked after
registerSchema(org.infinispan.protostream.SerializationContext). |
void |
registerSchema(SerializationContext serCtx)
Registers schema files to the given
SerializationContext. |
@Deprecated String getProtoFileName()
GeneratedSchema.getProtoFileName(). See IPROTO-154.@Deprecated String getProtoFile() throws UncheckedIOException
GeneratedSchema.getProtoFile(). See IPROTO-154.String. The returned value must be guaranteed to be the same
(equals) on each invocation. Implementations can return a constant or a value stored in memory but they are
generally free to also retrieve it from somewhere else, including the classpath, the disk, or even a mechanism
that can potentially fail with an UncheckedIOException.UncheckedIOException - if the file contents cannot be retrievedvoid registerSchema(SerializationContext serCtx)
SerializationContext. This is always invoked before
registerMarshallers(org.infinispan.protostream.SerializationContext).void registerMarshallers(SerializationContext serCtx)
SerializationContext.This is always invoked after
registerSchema(org.infinispan.protostream.SerializationContext).Copyright © 2021 JBoss, a division of Red Hat. All rights reserved.