public interface GeneratedSchema extends SerializationContextInitializer
SerializationContextInitializer that also exposes the generated Protobuf schema, which consists of the file
name and the file contents. Users will never implement this interface directly. Implementations are always generated
by the annotation processor based on the AutoProtoSchemaBuilder
annotation, identically as for SerializationContextInitializer.| Modifier and Type | Method and Description |
|---|---|
String |
getProtoFile()
Returns the contents of the proto file as a
String. |
String |
getProtoFileName()
Returns the name of the proto file.
|
default Reader |
getProtoFileReader()
Convenience method to obtain a
Reader of the schema file contents. |
registerMarshallers, registerSchemaString getProtoFileName()
getProtoFileName in interface SerializationContextInitializerString getProtoFile() throws UncheckedIOException
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.getProtoFile in interface SerializationContextInitializerUncheckedIOException - if the file contents cannot be retrieveddefault Reader getProtoFileReader() throws UncheckedIOException
Reader of the schema file contents. The caller is responsible for closing
the Reader once done with it.UncheckedIOException - if the file contents cannot be retrievedCopyright © 2021 JBoss, a division of Red Hat. All rights reserved.