class SpringWebFluxWebApplication implements ISpringWebFluxWebApplication {
// This class is made NOT final so that it can be proxied by Dependency Injection frameworks

    /*
     * There is no equivalent in Spring WebFlux to an application-level attribute container (e.g. ServletContext).
     * So for the attribute part of this interface, this implementation will simply keep an empty attribute map.
     */

    private final ReactiveAdapterRegistry reactiveAdapterRegistry;


    SpringWebFluxWebApplication(final ReactiveAdapterRegistry reactiveAdapterRegistry) {
        super();
        // reactiveAdapterRegistry can be null
        this.reactiveAdapterRegistry = reactiveAdapterRegistry;
    }


    public static SpringWebFluxWebApplication buildApplication(final ReactiveAdapterRegistry reactiveAdapterRegistry) {
        // reactiveAdapterRegistry can be null
        return new SpringWebFluxWebApplication(reactiveAdapterRegistry);
    }

    public ISpringWebFluxWebExchange buildExchange(
            final ServerWebExchange exchange, final Locale locale, final MediaType mediaType, final Charset charset) {<FILL_FUNCTION_BODY>}


    @Override
    public ReactiveAdapterRegistry getReactiveAdapterRegistry() {
        return this.reactiveAdapterRegistry;
    }

    @Override
    public Map<String, Object> getAttributes() {
        return Collections.emptyMap();
    }

    @Override
    public void setAttributeValue(final String name, final Object value) {
        Validate.notNull(name, "Name cannot be null");
        throw new UnsupportedOperationException("No support for application-level attributes in Spring WebFlux");
    }

    @Override
    public void removeAttribute(final String name) {
        Validate.notNull(name, "Name cannot be null");
        throw new UnsupportedOperationException("No support for application-level attributes in Spring WebFlux");
    }


    @Override
    public boolean resourceExists(final String path) {
        Validate.notNull(path, "Path cannot be null");
        throw new UnsupportedOperationException("No support for webapplication-based resource resolution in Spring WebFlux");
    }

    @Override
    public InputStream getResourceAsStream(final String path) {
        Validate.notNull(path, "Path cannot be null");
        throw new UnsupportedOperationException("No support for webapplication-based resource resolution in Spring WebFlux");
    }

}


        Validate.notNull(exchange, "ServerWebExchange cannot be null");
        Validate.notNull(locale, "Locale cannot be null");
        Validate.notNull(mediaType, "Media Type cannot be null");
        Validate.notNull(charset, "Charset cannot be null");

        final SpringWebFluxWebRequest request = new SpringWebFluxWebRequest(exchange.getRequest());

        return new SpringWebFluxWebExchange(request, this, exchange, locale, mediaType, charset);

    
<no_super_class>