Package org.apache.sling.servlets.resolver.internal.bundle

# Class BundledScriptTracker

java.lang.Object
org.apache.sling.servlets.resolver.internal.bundle.BundledScriptTracker

All Implemented Interfaces:
  `org.apache.felix.hc.api.HealthCheck`, `org.osgi.util.tracker.BundleTrackerCustomizer<List<org.osgi.framework.ServiceRegistration<javax.servlet.Servlet>>>`

@Capability(namespace="osgi.extender", name="sling.scripting", version="1.0.0") public class BundledScriptTracker extends Object implements org.osgi.util.tracker.BundleTrackerCustomizer<List<org.osgi.framework.ServiceRegistration<javax.servlet.Servlet>>>, org.apache.felix.hc.api.HealthCheck

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static @interface`
`BundledScriptTracker.BundledScriptTrackerConfig`

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`AT_EXTENDS`
`static final String`
`AT_SCRIPT_ENGINE`
`static final String`
`AT_SCRIPT_EXTENSION`
`static final String`
`AT_VERSION`
`static final String`
`NS_SLING_SERVLET`

### Fields inherited from interface org.apache.felix.hc.api.HealthCheck

`ASYNC_CRON_EXPRESSION, ASYNC_INTERVAL_IN_SEC, KEEP_NON_OK_RESULTS_STICKY_FOR_SEC, MBEAN_NAME, NAME, RESULT_CACHE_TTL_IN_MS, TAGS`

## Constructor Summary

Constructors
Constructor
Description
`BundledScriptTracker()`

## Method Summary

Modifier and Type
Method
Description
`protected void`
`activate(org.osgi.framework.BundleContext context, BundledScriptTracker.BundledScriptTrackerConfig config)`
`List<org.osgi.framework.ServiceRegistration<javax.servlet.Servlet>>`
`addingBundle(org.osgi.framework.Bundle bundle, org.osgi.framework.BundleEvent event)`
`protected void`
`bindSearchPathProvider(SearchPathProvider searchPathProvider)`
`protected void`
`deactivate()`
`org.apache.felix.hc.api.Result`
`execute()`
`protected static Set<String>`
`filterForExistingBundles(org.osgi.framework.BundleContext bundleContext, Set<String> expectedBundles)`
Return the symbolic names of bundles which are provided via {{code expectedBundles}} and present
`void`
`modifiedBundle(org.osgi.framework.Bundle bundle, org.osgi.framework.BundleEvent event, List<org.osgi.framework.ServiceRegistration<javax.servlet.Servlet>> regs)`
`void`
`removedBundle(org.osgi.framework.Bundle bundle, org.osgi.framework.BundleEvent event, List<org.osgi.framework.ServiceRegistration<javax.servlet.Servlet>> regs)`
`protected void`
`unbindSearchPathProvider(SearchPathProvider searchPathProvider)`

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

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

## Field Details

### NS_SLING_SERVLET

public static final String NS_SLING_SERVLET

See Also:
  - Constant Field Values

### AT_VERSION

public static final String AT_VERSION

See Also:
  - Constant Field Values

### AT_SCRIPT_ENGINE

public static final String AT_SCRIPT_ENGINE

See Also:
  - Constant Field Values

### AT_SCRIPT_EXTENSION

public static final String AT_SCRIPT_EXTENSION

See Also:
  - Constant Field Values

### AT_EXTENDS

public static final String AT_EXTENDS

See Also:
  - Constant Field Values

## Constructor Details

### BundledScriptTracker

public BundledScriptTracker()

## Method Details

### activate

protected void activate(org.osgi.framework.BundleContext context, BundledScriptTracker.BundledScriptTrackerConfig config)

### deactivate

protected void deactivate()

### bindSearchPathProvider

protected void bindSearchPathProvider(SearchPathProvider searchPathProvider)

### unbindSearchPathProvider

protected void unbindSearchPathProvider(SearchPathProvider searchPathProvider)

### addingBundle

public List<org.osgi.framework.ServiceRegistration<javax.servlet.Servlet>> addingBundle(org.osgi.framework.Bundle bundle, org.osgi.framework.BundleEvent event)

Specified by:
  `addingBundle` in interface `org.osgi.util.tracker.BundleTrackerCustomizer<List<org.osgi.framework.ServiceRegistration<javax.servlet.Servlet>>>`

### modifiedBundle

public void modifiedBundle(org.osgi.framework.Bundle bundle, org.osgi.framework.BundleEvent event, List<org.osgi.framework.ServiceRegistration<javax.servlet.Servlet>> regs)

Specified by:
  `modifiedBundle` in interface `org.osgi.util.tracker.BundleTrackerCustomizer<List<org.osgi.framework.ServiceRegistration<javax.servlet.Servlet>>>`

### removedBundle

public void removedBundle(org.osgi.framework.Bundle bundle, org.osgi.framework.BundleEvent event, List<org.osgi.framework.ServiceRegistration<javax.servlet.Servlet>> regs)

Specified by:
  `removedBundle` in interface `org.osgi.util.tracker.BundleTrackerCustomizer<List<org.osgi.framework.ServiceRegistration<javax.servlet.Servlet>>>`

### execute

public org.apache.felix.hc.api.Result execute()

Specified by:
  `execute` in interface `org.apache.felix.hc.api.HealthCheck`

### filterForExistingBundles

protected static Set<String> filterForExistingBundles(org.osgi.framework.BundleContext bundleContext, Set<String> expectedBundles)
Return the symbolic names of bundles which are provided via {{code expectedBundles}} and present

Parameters:
  `bundleContext` - a bundleContext
  `expectedBundles` - the symbolic names of bundles to check for
Returns:
  the symbolic names of present bundles