You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem with the reactive part is that the AntivirusEngine signature is not ready to implement the feature.
There is not an easy way to implement it without a breaking change.
Reactive signature example with Mutiny:
packageio.quarkiverse.antivirus.runtime;
importjava.io.InputStream;
importio.smallrye.mutiny.Uni;
/** * Service provider interface for virus scanning that might be used in file upload component for example when dealing with * untrusted files. */publicinterfaceAntivirusEngine {
/** * Indicate whether this {@link AntivirusEngineReactive} is enabled or not. * * @return <code>true</code> if enabled, <code>false</code> otherwise */booleanisEnabled();
/** * Perform virus scan and throw exception if a virus has been detected. * * @param filename the name of the file to scan * @param inputStream the inputStream containing the file contents * @return the {@link AntivirusScanResult} containing the results */Uni<AntivirusScanResult> scan(finalStringfilename, finalInputStreaminputStream);
}
To implement a reactive engine, the easy way is maybe to use Vertx with Mutiny.
But we can also use Vertx or native JAVA API with CompletionStage.
I am not as familiar with Reactive but an example in the docs and an Integration test would be great for someone to add as a good first issue.
https://quarkus.io/guides/resteasy-reactive#multipart
The text was updated successfully, but these errors were encountered: