@Override
    public Collection<SingleLogoutRequestContext> handle(final WebApplicationService singleLogoutService,
                                                         final String ticketId,
                                                         final SingleLogoutExecutionRequest context) {
        if (singleLogoutService.isLoggedOutAlready()) {
            LOGGER.debug("Service [{}] is already logged out.", singleLogoutService);
            return new ArrayList<>();
        }
        val selectedService = FunctionUtils.doUnchecked(() ->
            (WebApplicationService) authenticationRequestServiceSelectionStrategies.resolveService(singleLogoutService));

        LOGGER.trace("Processing logout request for service [{}]...", selectedService);
        val registeredService = servicesManager.findServiceBy(selectedService);

        LOGGER.debug("Service [{}] supports single logout and is found in the registry as [{}]. Proceeding...",
            selectedService.getId(), registeredService.getName());

        val logoutUrls = singleLogoutServiceLogoutUrlBuilder.determineLogoutUrl(registeredService, selectedService);
        LOGGER.debug("Prepared logout url [{}] for service [{}]", logoutUrls, selectedService);
        if (logoutUrls == null || logoutUrls.isEmpty()) {
            LOGGER.debug("Service [{}] does not support logout operations given no logout url could be determined.", selectedService);
            return new ArrayList<>();
        }

        LOGGER.trace("Creating logout request for [{}] and ticket id [{}]", selectedService, ticketId);
        return createLogoutRequests(ticketId, selectedService, registeredService, logoutUrls, context);
    }
This is {@link BaseSingleLogoutServiceMessageHandler}.

@author Misagh Moayyed
@since 6.0.0
core/cas-server-core-logout-api/src/main/java/org/apereo/cas/logout/slo/BaseSingleLogoutServiceMessageHandler.java