Package org.apache.sling.feature.launcher.spi.extensions

# Interface ExtensionHandler

All Known Implementing Classes:
  `ContentPackageHandler`, `RepoInitHandler`

public interface ExtensionHandler
A extension handler can be used to add additional functionality to the launcher based on extension in the feature model. For example, the Apache Sling specific extension for repoinit is unknown to the launcher. An extension handler can be used to handle that extension and provide the information to the runtime. Before launching, the extension handlers are called until a handler returns `true` for an extension. Therefore only one handler can be invoked for a given extension. An extension handler is needed for every required extension in the feature model.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`handle(ExtensionContext context, org.apache.sling.feature.Extension extension)`
Try to handle the extension.

## Method Details

### handle

boolean handle(ExtensionContext context, org.apache.sling.feature.Extension extension) throws Exception
Try to handle the extension. As soon as a handler returns `true`, no other handler is invoked for this extension.

Parameters:
  `context` - Context for the handler
  `extension` - The feature model extension
Returns:
  `true` if the handler handled the extension.
Throws:
  `Exception` - If an error occurs during processing of the extension.