public class OsgiInstallerImpl extends Object implements OsgiInstaller, ResourceChangeListener, RetryHandler, InfoProvider, Runnable
Constructor and Description |
---|
OsgiInstallerImpl(org.osgi.framework.BundleContext ctx)
Constructor
Most of the initialization is defered to the background thread
|
Modifier and Type | Method and Description |
---|---|
void |
deactivate()
Deactivate
|
InstallationState |
getInstallationState()
Return the current installation state.
|
void |
registerResources(String scheme,
InstallableResource[] resources)
Provide the installer with the complete list of installable
resources for a given client.
|
void |
resourceAddedOrUpdated(String resourceType,
String entityId,
InputStream is,
Dictionary<String,Object> dict,
Map<String,Object> attributes)
Inform the installer about an added or updated
resource
|
void |
resourceRemoved(String resourceType,
String resourceId)
Inform the installer about a removed resource
|
void |
run() |
void |
scheduleRetry()
Schedule a retry.
|
void |
start()
Start this component.
|
void |
updateResources(String scheme,
InstallableResource[] resources,
String[] ids)
Inform the installer that resources are available for installation
and/or other resources are no longer available.
|
public OsgiInstallerImpl(org.osgi.framework.BundleContext ctx)
public void deactivate()
public void start()
public void run()
run
in interface Runnable
Runnable.run()
public void updateResources(String scheme, InstallableResource[] resources, String[] ids)
OsgiInstaller
updateResources
in interface OsgiInstaller
scheme
- identifies the client.ids
- An array of identifiers for removed resources - might be nullOsgiInstaller.updateResources(java.lang.String, org.apache.sling.installer.api.InstallableResource[], java.lang.String[])
public void registerResources(String scheme, InstallableResource[] resources)
OsgiInstaller
registerResources
in interface OsgiInstaller
scheme
- identifies the client.resources
- the list of available resourcesOsgiInstaller.registerResources(java.lang.String, org.apache.sling.installer.api.InstallableResource[])
public void scheduleRetry()
RetryHandler
scheduleRetry
in interface RetryHandler
RetryHandler.scheduleRetry()
public void resourceAddedOrUpdated(String resourceType, String entityId, InputStream is, Dictionary<String,Object> dict, Map<String,Object> attributes)
ResourceChangeListener
resourceAddedOrUpdated
in interface ResourceChangeListener
resourceType
- The resource typeentityId
- The entity id (symbolic name etc.)is
- Input stream ordict
- DictionaryResourceChangeListener.resourceAddedOrUpdated(java.lang.String, java.lang.String, java.io.InputStream, java.util.Dictionary, Map)
public void resourceRemoved(String resourceType, String resourceId)
ResourceChangeListener
resourceRemoved
in interface ResourceChangeListener
resourceType
- The resource typeresourceId
- The entity id (symbolic name etc.)ResourceChangeListener.resourceRemoved(java.lang.String, java.lang.String)
public InstallationState getInstallationState()
InfoProvider
getInstallationState
in interface InfoProvider
InfoProvider.getInstallationState()
Copyright © 2007–2014 The Apache Software Foundation. All rights reserved.