Home / Function/ load() — spring-boot Function Reference

load() — spring-boot Function Reference

Architecture documentation for the load() function in DockerApi.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  1490249f_76a9_8c84_3261_04b13e934ae0["load()"]
  d1757773_1e32_5f99_15ef_5bbc9a9d8dd2["buildUrl()"]
  1490249f_76a9_8c84_3261_04b13e934ae0 -->|calls| d1757773_1e32_5f99_15ef_5bbc9a9d8dd2
  685b5c6e_3d29_472d_7dd1_5c354533b579["LoadImageUpdateListener()"]
  1490249f_76a9_8c84_3261_04b13e934ae0 -->|calls| 685b5c6e_3d29_472d_7dd1_5c354533b579
  fe17330d_1d3c_c6fb_1bd5_6cb12e48b7be["http()"]
  1490249f_76a9_8c84_3261_04b13e934ae0 -->|calls| fe17330d_1d3c_c6fb_1bd5_6cb12e48b7be
  0ec3fa26_b0d2_1148_a290_00f44d68051c["jsonStream()"]
  1490249f_76a9_8c84_3261_04b13e934ae0 -->|calls| 0ec3fa26_b0d2_1148_a290_00f44d68051c
  78696972_8ea7_802b_e0a1_e45b3f435730["assertValidResponseReceived()"]
  1490249f_76a9_8c84_3261_04b13e934ae0 -->|calls| 78696972_8ea7_802b_e0a1_e45b3f435730
  aedd9701_c439_405f_f47e_c53ca8d2db00["get()"]
  1490249f_76a9_8c84_3261_04b13e934ae0 -->|calls| aedd9701_c439_405f_f47e_c53ca8d2db00
  a1ee3ef2_1dd0_7394_2e65_dc54bedc20dc["onUpdate()"]
  1490249f_76a9_8c84_3261_04b13e934ae0 -->|calls| a1ee3ef2_1dd0_7394_2e65_dc54bedc20dc
  style 1490249f_76a9_8c84_3261_04b13e934ae0 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

buildpack/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/docker/DockerApi.java lines 290–311

		public void load(ImageArchive archive, UpdateListener<LoadImageUpdateEvent> listener) throws IOException {
			Assert.notNull(archive, "'archive' must not be null");
			Assert.notNull(listener, "'listener' must not be null");
			URI loadUri = buildUrl("/images/load");
			LoadImageUpdateListener streamListener = new LoadImageUpdateListener(archive);
			listener.onStart();
			try {
				try (Response response = http().post(loadUri, "application/x-tar", archive::writeTo)) {
					InputStream content = response.getContent();
					if (content != null) {
						jsonStream().get(content, LoadImageUpdateEvent.class, (event) -> {
							streamListener.onUpdate(event);
							listener.onUpdate(event);
						});
					}
				}
				streamListener.assertValidResponseReceived();
			}
			finally {
				listener.onFinish();
			}
		}

Subdomains

Frequently Asked Questions

What does load() do?
load() is a function in the spring-boot codebase.
What does load() call?
load() calls 7 function(s): LoadImageUpdateListener, assertValidResponseReceived, buildUrl, get, http, jsonStream, onUpdate.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free