MCPcopy Create free account
hub / github.com/GDATASoftwareAG/vaas / IVaas

Interface IVaas

java/src/main/java/de/gdata/vaas/IVaas.java:18–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16import java.util.concurrent.CompletableFuture;
17
18public interface IVaas {
19 /**
20 * Asynchronously retrieves a {@link CompletableFuture} containing the
21 * {@link VaasVerdict} for the given SHA-256 hash.
22 *
23 * @param sha256 the SHA-256 hash to retrieve the verdict for
24 * @return a {@link CompletableFuture} containing the {@link VaasVerdict} for
25 * the hash
26 */
27 CompletableFuture<VaasVerdict> forSha256Async(Sha256 sha256);
28
29 /**
30 * Asynchronously retrieves a {@link CompletableFuture} containing the
31 * {@link VaasVerdict} for the given SHA-256 hash.
32 *
33 * @param sha256 the SHA-256 hash to retrieve the verdict for
34 * @param options The options to customize the request, such as using the cache
35 * and hash lookup. If not set the global options passed to the Vaas constructor are used.
36 * @return a {@link CompletableFuture} containing the {@link VaasVerdict} for
37 * the hash
38 */
39 CompletableFuture<VaasVerdict> forSha256Async(Sha256 sha256, ForSha256Options options);
40
41 /**
42 * Retrieves a {@link VaasVerdict} for the given SHA-256 hash.
43 *
44 * @param sha256 the SHA-256 hash to retrieve the verdict for
45 * @return the {@link VaasVerdict} for the given SHA-256 hash
46 * @throws InterruptedException If the thread is interrupted
47 * @throws VaasAuthenticationException If there is an authentication error. Don't repeat the request. Check your credentials and token endpoint.
48 * @throws VaasClientException The request is malformed or cannot be completed. Recommended actions: Don't repeat the request. Log. Analyze the error.
49 * @throws VaasServerException The server encountered an internal error. Recommended actions: You may retry the request after a certain delay. If the problem persists contact G DATA.
50 */
51 VaasVerdict forSha256(Sha256 sha256) throws InterruptedException, VaasAuthenticationException, VaasClientException, VaasServerException;
52
53 /**
54 * Retrieves a {@link VaasVerdict} for the given SHA-256 hash.
55 *
56 * @param sha256 the SHA-256 hash to retrieve the verdict for
57 * @param options The options to customize the request, such as using the cache
58 * and hash lookup. If not set the global options passed to the Vaas constructor are used.
59 * @return the {@link VaasVerdict} for the given SHA-256 hash
60 * @throws InterruptedException If the thread is interrupted
61 * @throws VaasAuthenticationException If there is an authentication error. Don't repeat the request. Check your credentials and token endpoint.
62 * @throws VaasClientException The request is malformed or cannot be completed. Recommended actions: Don't repeat the request. Log. Analyze the error.
63 * @throws VaasServerException The server encountered an internal error. Recommended actions: You may retry the request after a certain delay. If the problem persists contact G DATA.
64 */
65 VaasVerdict forSha256(Sha256 sha256, ForSha256Options options)
66 throws InterruptedException, VaasAuthenticationException, VaasClientException, VaasServerException;
67
68 /**
69 * Asynchronously processes a given input stream and returns a
70 * {@link CompletableFuture}
71 * containing the {@link VaasVerdict}.
72 *
73 * @param stream the input stream to be processed
74 * @param contentLength the length of the content in the input stream
75 * @return a {@link CompletableFuture} containing the {@link VaasVerdict}

Implementers 1

Vaasjava/src/main/java/de/gdata/vaas/Vaas.

Calls

no outgoing calls

Tested by

no test coverage detected