class URLHandlersActivator extends java.lang.Object implements BundleActivator
Simple activator class used by the system bundle to enable the URL Handlers service. The only purpose of this class is to call URLHandlers.registerInstance() when the framework is started and URLHandlers.unregisterInstance() when the framework is stopped.
| Modifier and Type | Field and Description |
|---|---|
private java.util.Map |
m_configMap |
private Felix |
m_framework |
| Constructor and Description |
|---|
URLHandlersActivator(java.util.Map configMap,
Felix framework) |
| Modifier and Type | Method and Description |
|---|---|
private <S> S |
get(java.util.Set<ServiceReference<S>> hooks,
java.lang.String key,
java.lang.String value) |
protected java.lang.Object |
getContentHandlerService(java.lang.String mimeType) |
protected java.lang.Object |
getStreamHandlerService(java.lang.String protocol) |
void |
start(BundleContext context)
Called when this bundle is started so the Framework can perform the
bundle-specific activities necessary to start this bundle.
|
void |
stop(BundleContext context)
Called when this bundle is stopped so the Framework can perform the
bundle-specific activities necessary to stop the bundle.
|
private final java.util.Map m_configMap
private final Felix m_framework
public URLHandlersActivator(java.util.Map configMap,
Felix framework)
public void start(BundleContext context)
BundleActivatorThis method must complete and return to its caller in a timely manner.
start in interface BundleActivatorcontext - The execution context of the bundle being started.public void stop(BundleContext context)
BundleActivatorBundleActivator.start method
started. There should be no active threads that were started by this
bundle when this bundle returns. A stopped bundle must not call any
Framework objects.
This method must complete and return to its caller in a timely manner.
stop in interface BundleActivatorcontext - The execution context of the bundle being stopped.protected java.lang.Object getStreamHandlerService(java.lang.String protocol)
protected java.lang.Object getContentHandlerService(java.lang.String mimeType)
private <S> S get(java.util.Set<ServiceReference<S>> hooks, java.lang.String key, java.lang.String value)