Home / Class/ AttributeCapturingRequestDispatcher Class — spring-boot Architecture

AttributeCapturingRequestDispatcher Class — spring-boot Architecture

Architecture documentation for the AttributeCapturingRequestDispatcher class in ErrorPageFilterTests.java from the spring-boot codebase.

Entity Profile

Relationship Graph

Source Code

core/spring-boot/src/test/java/org/springframework/boot/web/servlet/support/ErrorPageFilterTests.java lines 499–525

		private static final class AttributeCapturingRequestDispatcher extends MockRequestDispatcher {

			private final Map<String, Object> requestAttributes = new HashMap<>();

			private AttributeCapturingRequestDispatcher(String resource) {
				super(resource);
			}

			@Override
			public void forward(ServletRequest request, ServletResponse response) {
				captureAttributes(request);
				super.forward(request, response);
			}

			private void captureAttributes(ServletRequest request) {
				Enumeration<String> names = request.getAttributeNames();
				while (names.hasMoreElements()) {
					String name = names.nextElement();
					this.requestAttributes.put(name, request.getAttribute(name));
				}
			}

			private Map<String, Object> getRequestAttributes() {
				return this.requestAttributes;
			}

		}

Domain

Analyze Your Own Codebase

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

Try Supermodel Free