KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > osgi > event > BatchBundleListener


1 /*******************************************************************************
2  * Copyright (c) 2005 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
12 package org.eclipse.osgi.event;
13
14 import org.osgi.framework.*;
15
16 /**
17  * A batch <code>BundleEvent</code> listener.
18  *
19  * <p>
20  * <code>BatchBundleListener</code> is a listener interface that may be
21  * implemented by a bundle developer.
22  * <p>
23  * A <code>BatchBundleListener</code> object is registered with the
24  * Framework using the {@link BundleContext#addBundleListener} method.
25  * <code>BatchBundleListener</code> objects are called with a
26  * <code>BundleEvent</code> object when a bundle has been installed, resolved,
27  * started, stopped, updated, unresolved, or uninstalled.
28  * <p>
29  * A <code>BatchBundleListener</code> acts like a <code>BundleListener</code>
30  * except the framework will call the {@link #batchBegin()} method at the beginning
31  * of a batch process and call the {@link #batchEnd()} at the end of a batch
32  * process. For example, the framework may notify a <code>BatchBundleListener</code>
33  * of a batching process during a refresh packages operation or a resolve bundles
34  * operation.
35  * <p>
36  * During a batching operation the framework will continue to deliver any events using
37  * the {@link BundleListener#bundleChanged(BundleEvent)} method to the
38  * <code>BatchBundleListener</code>. It is the responsiblity of the
39  * <code>BatchBundleListener</code> to decide how to handle events when a
40  * batching operation is in progress.
41  * <p>
42  * Note that the framework does not guarantee that batching operations will not
43  * overlap. This can result in the method {@link #batchBegin()} being called
44  * multiple times before the first {@link #batchEnd()} is called.
45  *
46  * <p>
47  * Clients may implement this interface.
48  * </p>
49  * @since 3.1
50  * @see BundleEvent
51  * @see BundleListener
52  */

53 public interface BatchBundleListener extends BundleListener {
54     /**
55      * Indicates that a batching process has begun.
56      */

57     public abstract void batchBegin();
58
59     /**
60      * Indicates that a batching process has ended.
61      */

62     public abstract void batchEnd();
63 }
64
Popular Tags