MCPcopy Create free account
hub / github.com/extism/java-sdk / UrlWasmSource

Class UrlWasmSource

src/main/java/org/extism/sdk/wasm/UrlWasmSource.java:6–49  ·  view source on GitHub ↗

WASM Source represented by a url.

Source from the content-addressed store, hash-verified

4 * WASM Source represented by a url.
5 */
6public class UrlWasmSource implements WasmSource {
7
8 private final String name;
9
10 private final String url;
11
12 private final String hash;
13
14 /**
15 * Provides a quick way to instantiate with just a url
16 *
17 * @param url String url to the wasm file
18 * @return
19 */
20 public static UrlWasmSource fromUrl(String url) {
21 return new UrlWasmSource(null, url, null);
22 }
23
24 /**
25 * Constructor
26 * @param name
27 * @param url
28 * @param hash
29 */
30 public UrlWasmSource(String name, String url, String hash) {
31 this.name = name;
32 this.url = url;
33 this.hash = hash;
34 }
35
36 @Override
37 public String name() {
38 return name;
39 }
40
41 @Override
42 public String hash() {
43 return hash;
44 }
45
46 public String url() {
47 return url;
48 }
49}
50

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected