Package org.apache.sling.launchpad.base.impl

# Class DefaultStartupHandler

java.lang.Object
org.apache.sling.launchpad.base.impl.DefaultStartupHandler

All Implemented Interfaces:
  `Runnable`, `EventListener`, `org.apache.sling.launchpad.api.StartupHandler`, `org.osgi.framework.BundleListener`, `org.osgi.framework.FrameworkListener`

public class DefaultStartupHandler extends Object implements org.apache.sling.launchpad.api.StartupHandler, org.osgi.framework.BundleListener, org.osgi.framework.FrameworkListener, Runnable
The installation listener is listening for - framework events - events from other services It notifies listeners about the finish of the startup and about an approximate progress.

Since:
  2.4.0
See Also:
  - `StartupHandler`
  - `StartupListener`

## Constructor Summary

Constructors
Constructor
Description
`DefaultStartupHandler(org.osgi.framework.BundleContext context, org.apache.felix.framework.Logger logger, StartupManager manager, long startedAt)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`void`
`bundleChanged(org.osgi.framework.BundleEvent event)`
`void`
`frameworkEvent(org.osgi.framework.FrameworkEvent event)`
`org.apache.sling.launchpad.api.StartupMode`
`getMode()`
`boolean`
`isFinished()`
`void`
`run()`
`void`
`waitWithStartup(boolean flag)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### DefaultStartupHandler

public DefaultStartupHandler(org.osgi.framework.BundleContext context, org.apache.felix.framework.Logger logger, StartupManager manager, long startedAt)
Constructor.

Parameters:
  `context` - Bundle context
  `logger` - Logger
  `manager` - The startup manager
  `startedAt` - The started time

## Method Details

### getMode

public org.apache.sling.launchpad.api.StartupMode getMode()

Specified by:
  `getMode` in interface `org.apache.sling.launchpad.api.StartupHandler`
See Also:
  - `StartupHandler.getMode()`

### isFinished

public boolean isFinished()

Specified by:
  `isFinished` in interface `org.apache.sling.launchpad.api.StartupHandler`
See Also:
  - `StartupHandler.isFinished()`

### run

public void run()

Specified by:
  `run` in interface `Runnable`
See Also:
  - `Runnable.run()`

### waitWithStartup

public void waitWithStartup(boolean flag)

Specified by:
  `waitWithStartup` in interface `org.apache.sling.launchpad.api.StartupHandler`
See Also:
  - `StartupHandler.waitWithStartup(boolean)`

### frameworkEvent

public void frameworkEvent(org.osgi.framework.FrameworkEvent event)

Specified by:
  `frameworkEvent` in interface `org.osgi.framework.FrameworkListener`
See Also:
  - `FrameworkListener.frameworkEvent(org.osgi.framework.FrameworkEvent)`

### bundleChanged

public void bundleChanged(org.osgi.framework.BundleEvent event)

Specified by:
  `bundleChanged` in interface `org.osgi.framework.BundleListener`
See Also:
  - `BundleListener.bundleChanged(org.osgi.framework.BundleEvent)`