KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > osgi > framework > adaptor > core > BundleInstaller


1 /*******************************************************************************
2  * Copyright (c) 2004 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.osgi.framework.adaptor.core;
12
13 import org.eclipse.osgi.service.resolver.BundleDescription;
14 import org.osgi.framework.BundleException;
15
16 /**
17  * A bundle installer allows the platform admin implementation to
18  * delegate the behavior of installing/uninstalling bundles to
19  * another object.
20  * <p>
21  * Clients may implement this interface.
22  * </p>
23  * @since 3.1
24  * @see StateManager#commit
25  */

26 public interface BundleInstaller {
27     /**
28      * Installs a bundle associated with the specified BundleDescription
29      * @param toInstall the BundleDescription associated with the bundle to install
30      * @throws BundleException if an error occurs while installing the bundle
31      */

32     public void installBundle(BundleDescription toInstall) throws BundleException;
33
34     /**
35      * Uninstalls a bundle associated with the specified BundleDescription
36      * @param toUninstall the BundleDescriptoin associated with the bundle to uninstall
37      * @throws BundleException if an error occurs while uninstalling the bundle
38      */

39     public void uninstallBundle(BundleDescription toUninstall) throws BundleException;
40
41     /**
42      * Updates a bundle associated with the specified BundleDescription
43      * @param toRefresh the BundleDescription associated with the bundle to update
44      * @throws BundleException if an error occurs while updating the bundle
45      */

46     public void updateBundle(BundleDescription toRefresh) throws BundleException;
47 }
48
Popular Tags