com.eurotech.framework.deployment.agent.impl
Class DeploymentAgent
java.lang.Object
com.eurotech.framework.deployment.agent.impl.DeploymentAgent
- All Implemented Interfaces:
- DeploymentAgentService, org.eclipse.osgi.framework.console.CommandProvider
public class DeploymentAgent
- extends Object
- implements DeploymentAgentService, org.eclipse.osgi.framework.console.CommandProvider
- Author:
- cdealti
The bundles installed from deployment packages are managed by the deployment admin itself.
Once installed they are persisted in the persistent storage area provided by the framework.
The persistent storage area is wiped up if the framework is stated with the '-clean' option.
The way deployment packages and their bundles are stored in the persistence storage area
is implementation dependent and we should not rely on that.
In order to be able to reinstall deployment packages across reboots of the framework with
the '-clean' option set, we need to store the deployment package files (.dp) in a different
persistent location.
Limitations:
We should also keep the entire installation history. This is needed because deployment
packages can be partially upgraded through 'fix packages' and these must be reinstalled in the
right order.
We DO NOT support this yet. We assume that for every installed deployment package
there is a single deployment package file (.dp) that needs to be reinstalled.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DeploymentAgent
public DeploymentAgent()
activate
protected void activate(org.osgi.service.component.ComponentContext componentContext)
deactivate
protected void deactivate(org.osgi.service.component.ComponentContext componentContext)
setDeploymentAdmin
public void setDeploymentAdmin(org.osgi.service.deploymentadmin.DeploymentAdmin deploymentAdmin)
unsetDeploymentAdmin
public void unsetDeploymentAdmin(org.osgi.service.deploymentadmin.DeploymentAdmin deploymentAdmin)
setEventAdmin
protected void setEventAdmin(org.osgi.service.event.EventAdmin eventAdmin)
unsetEventAdmin
protected void unsetEventAdmin(org.osgi.service.event.EventAdmin eventAdmin)
installDeploymentPackageAsync
public void installDeploymentPackageAsync(String url)
throws Exception
- Description copied from interface:
DeploymentAgentService
- Installs a Deployment Package asynchronously fetching it at the given URL.
The method queues the package URL and returns immediately.
The result of the package installation is notified asynchronously
posting an Event
on the topic DeploymentAgentService.EVENT_INSTALLED_TOPIC
- Specified by:
installDeploymentPackageAsync
in interface DeploymentAgentService
- Parameters:
url
- The URL of the deployment package
- Throws:
Exception
- If the installation of a deployment package at the same URL is still pending- See Also:
installDeploymentPackage
uninstallDeploymentPackageAsync
public void uninstallDeploymentPackageAsync(String name)
throws Exception
- Description copied from interface:
DeploymentAgentService
- Uninstalls a Deployment Package asynchronously.
The method queues the package symbolic name and returns immediately.
The result of the package uninstallation is notified asynchronously
posting an Event
on the topic DeploymentAgentService.EVENT_UNINSTALLED_TOPIC
- Specified by:
uninstallDeploymentPackageAsync
in interface DeploymentAgentService
- Parameters:
name
- The symbolic name of the deployment package
- Throws:
Exception
- If the uninstallation of a deployment package at the same symbolic name is still pending- See Also:
uninstallDeploymentPackage
isInstallingDeploymentPackage
public boolean isInstallingDeploymentPackage(String url)
- Description copied from interface:
DeploymentAgentService
- Asks if the installation of a deployment package at the given URL is pending.
- Specified by:
isInstallingDeploymentPackage
in interface DeploymentAgentService
- Parameters:
url
- The URL of the deployment package
- Returns:
- true if the installation of a deployment package at URL is pending
isUninstallingDeploymentPackage
public boolean isUninstallingDeploymentPackage(String name)
- Description copied from interface:
DeploymentAgentService
- Asks if the uninstallation of a deployment package with the given symbolic name is pending.
- Specified by:
isUninstallingDeploymentPackage
in interface DeploymentAgentService
- Parameters:
name
- The symbolic name of the deployment package
- Returns:
- true if the uninstallation of a deployment package at URL is pending
_dpa
public void _dpa(org.eclipse.osgi.framework.console.CommandInterpreter ci)
getHelp
public String getHelp()
- Specified by:
getHelp
in interface org.eclipse.osgi.framework.console.CommandProvider
Copyright © 2013. All Rights Reserved.