use of org.infinispan.protostream.impl.SerializationContextImpl in project kogito-runtimes by kiegroup.
the class ProtostreamProtobufAdapterTypeProvider method buildSerializationContext.
private SerializationContextImpl buildSerializationContext() throws IOException {
SerializationContextImpl context = new SerializationContextImpl(Configuration.builder().build());
for (String protoResource : protostreamDescriptors()) {
try (InputStream is = getInputStream(protoResource)) {
if (is == null) {
continue;
}
FileDescriptorSource source = new FileDescriptorSource().addProtoFile(getFileName(protoResource), is);
context.registerProtoFiles(source);
}
}
return context;
}
Aggregations