private void startupFinished()

in src/main/java/org/apache/sling/launchpad/base/impl/DefaultStartupHandler.java [361:404]


    private void startupFinished() {
        this.log(Logger.LOG_INFO, "Startup finished in " + String.valueOf(System.currentTimeMillis() - this.startedAt) + "ms");
        this.finished.set(true);

        for (final StartupListener listener : this.listenerTracker.getServices(new StartupListener[0])) {
            try {
                listener.startupFinished(this.startupMode);
            } catch (Throwable t) {
                this.log(Logger.LOG_ERROR, "Error calling StartupListener " + listener, t);
            }
        }
        if ( this.mbeanStartupListener != null ) {
            this.mbeanStartupListener.startupFinished(this.startupMode);
        }

        // stop the queue
        this.enqueue(false);

        // clear bundle set
        this.activeBundles.clear();

        // unregister listeners
        if ( !this.useIncremental ) {
            this.bundleContext.removeBundleListener(this);
        }
        this.bundleContext.removeFrameworkListener(this);

        // register startup service
        final Dictionary<String, Object> serviceProps = new Hashtable<>();
        serviceProps.put(StartupMode.class.getName(), this.startupMode.name());
        serviceProps.put(Constants.SERVICE_DESCRIPTION, "Apache Sling Startup Service");
        serviceProps.put(Constants.SERVICE_VENDOR, "The Apache Software Foundation");
        this.bundleContext.registerService(StartupService.class, new StartupService() {

            @Override
            public StartupMode getStartupMode() {
                return startupMode;
            }

            }, serviceProps);

        // update timestamp
        this.startupManager.markInstalled();
    }