@Override
    public WebApplicationService extractServiceInternal(final HttpServletRequest request) {
        return getServiceFactories()
            .stream()
            .map(factory -> {
                val service = factory.createService(request);
                LOGGER.trace("Created [{}] based on [{}]", service, factory);
                return service;
            })
            .filter(Objects::nonNull)
            .findFirst()
            .orElseGet(() -> {
                LOGGER.trace("No service could be extracted based on the given request");
                return null;
            });
    }
The default argument extractor is responsible for creating service
objects based on requests. The task of creating services is delegated to
a service factory that is pluggable for each instance of the extractor.

@author Misagh Moayyed
@since 4.2
core/cas-server-core-web-api/src/main/java/org/apereo/cas/web/support/DefaultArgumentExtractor.java