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

runClosesContextsBeforeRunningHandlerActions() — spring-boot Function Reference

Architecture documentation for the runClosesContextsBeforeRunningHandlerActions() function in SpringApplicationShutdownHookTests.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  7cf6259e_f70d_9acd_7d27_09c00ac3014d["runClosesContextsBeforeRunningHandlerActions()"]
  68f49705_57e4_b3a9_1729_c26b8da322bd["TestApplicationContext()"]
  7cf6259e_f70d_9acd_7d27_09c00ac3014d -->|calls| 68f49705_57e4_b3a9_1729_c26b8da322bd
  9c40d12c_612f_fd8f_523a_f8d6efdf1684["TestHandlerAction()"]
  7cf6259e_f70d_9acd_7d27_09c00ac3014d -->|calls| 9c40d12c_612f_fd8f_523a_f8d6efdf1684
  b29bf6ca_0612_c857_a66f_9b3d1500e547["run()"]
  7cf6259e_f70d_9acd_7d27_09c00ac3014d -->|calls| b29bf6ca_0612_c857_a66f_9b3d1500e547
  style 7cf6259e_f70d_9acd_7d27_09c00ac3014d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot/src/test/java/org/springframework/boot/SpringApplicationShutdownHookTests.java lines 88–99

	@Test
	void runClosesContextsBeforeRunningHandlerActions() {
		TestSpringApplicationShutdownHook shutdownHook = new TestSpringApplicationShutdownHook();
		List<Object> finished = new CopyOnWriteArrayList<>();
		ConfigurableApplicationContext context = new TestApplicationContext(finished);
		shutdownHook.registerApplicationContext(context);
		context.refresh();
		Runnable handlerAction = new TestHandlerAction(finished);
		shutdownHook.getHandlers().add(handlerAction);
		shutdownHook.run();
		assertThat(finished).containsExactly(context, handlerAction);
	}

Domain

Subdomains

Frequently Asked Questions

What does runClosesContextsBeforeRunningHandlerActions() do?
runClosesContextsBeforeRunningHandlerActions() is a function in the spring-boot codebase.
What does runClosesContextsBeforeRunningHandlerActions() call?
runClosesContextsBeforeRunningHandlerActions() calls 3 function(s): TestApplicationContext, TestHandlerAction, run.

Analyze Your Own Codebase

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

Try Supermodel Free