Interface GeneratedSchema

    • Method Detail

      • getProtoFileName

        String getProtoFileName()
        Returns the name of the proto file. The name is allowed to contain slashes so it can look like an absolute or relative path. The returned value must be the same (equals) on each invocation.
        Specified by:
        getProtoFileName in interface SerializationContextInitializer
      • getProtoFile

        String getProtoFile()
                     throws UncheckedIOException
        Returns the contents of the proto file as a 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.
        Specified by:
        getProtoFile in interface SerializationContextInitializer
        Throws:
        UncheckedIOException - if the file contents cannot be retrieved
      • getProtoFileReader

        default Reader getProtoFileReader()
                                   throws UncheckedIOException
        Convenience method to obtain a Reader of the schema file contents. The caller is responsible for closing the Reader once done with it.
        Throws:
        UncheckedIOException - if the file contents cannot be retrieved