class VaadinService implements Serializable {

    public void init() throws ServiceException {
        instantiator = createInstantiator();

        // init the router now so that registry will be available for
        // modifications
        router = new Router(getRouteRegistry());

        List<RequestHandler> handlers = createRequestHandlers();

        ServiceInitEvent event = new ServiceInitEvent(this);

        // allow service init listeners and DI to use thread local access to
        // e.g. application scoped route registry
        runWithServiceContext(() -> {
            instantiator.getServiceInitListeners()
                    .forEach(listener -> listener.serviceInit(event));

            event.getAddedRequestHandlers().forEach(handlers::add);

            Collections.reverse(handlers);

            requestHandlers = Collections.unmodifiableCollection(handlers);

            dependencyFilters = instantiator
                    .getDependencyFilters(event.getAddedDependencyFilters())
                    .collect(Collectors.toList());
            bootstrapListeners = instantiator
                    .getBootstrapListeners(event.getAddedBootstrapListeners())
                    .collect(Collectors.toList());
            indexHtmlRequestListeners = instantiator
                    .getIndexHtmlRequestListeners(
                            event.getAddedIndexHtmlRequestListeners())
                    .collect(Collectors.toList());
        });

        DeploymentConfiguration configuration = getDeploymentConfiguration();
        if (!configuration.isProductionMode()) {
            Logger logger = getLogger();
            logger.debug("The application has the following routes: ");
            List<RouteData> routeDataList = getRouteRegistry().getRegisteredRoutes();
            if(!routeDataList.isEmpty()) {
                addRouterUsageStatistics();
            }
            routeDataList.stream()
                    .map(Object::toString).forEach(logger::debug);
        }
        if (getDeploymentConfiguration().isPnpmEnabled()) {
            UsageStatistics.markAsUsed("flow/pnpm",null);
        }

        initialized = true;
    }

    public  VaadinService(DeploymentConfiguration deploymentConfiguration);
    protected  VaadinService();

}