org.eclipse.osgi.framework.adaptor
Interface BundleWatcher

All Known Implementing Classes:
StatsManager

public interface BundleWatcher

Watches bundle lifecyle processes. This interface is different than that of a BundleLisener because it gets notified before and after all lifecycle changes. A bundle watcher acts as the main entry point for logging bundle activity.

Note that a bundle watcher is always notified of when a lifecycle processes has ended even in cases where the lifecycle process may have failed. For example, if activating a bundle fails the END_ACTIVATION flag will still be sent to the bundle watcher to notify them that the activation process has ended.

Clients may implement this interface.

Since:
3.1

Field Summary
static int END_ACTIVATION
          The activation process has ended for a bundle
static int END_DEACTIVATION
          The deactivation process has ended for a bundle
static int END_INSTALLING
          The install process has ended for a bundle
static int END_UNINSTALLING
          The uninstallation process has ended for a bundle
static int START_ACTIVATION
          The activation process is beginning for a bundle
static int START_DEACTIVATION
          The deactivation process is beginning for a bundle
static int START_INSTALLING
          The install process is beginning for a bundle
static int START_UNINSTALLING
          The uninstallation process is beginning for a bundle
 
Method Summary
 void watchBundle(Bundle bundle, int type)
          Receives notification that a lifecycle change is going to start or has ended.
 

Field Detail

START_INSTALLING

static final int START_INSTALLING
The install process is beginning for a bundle

Since:
3.2
See Also:
Constant Field Values

END_INSTALLING

static final int END_INSTALLING
The install process has ended for a bundle

Since:
3.2
See Also:
Constant Field Values

START_ACTIVATION

static final int START_ACTIVATION
The activation process is beginning for a bundle

Since:
3.2
See Also:
Constant Field Values

END_ACTIVATION

static final int END_ACTIVATION
The activation process has ended for a bundle

Since:
3.2
See Also:
Constant Field Values

START_DEACTIVATION

static final int START_DEACTIVATION
The deactivation process is beginning for a bundle

Since:
3.2
See Also:
Constant Field Values

END_DEACTIVATION

static final int END_DEACTIVATION
The deactivation process has ended for a bundle

Since:
3.2
See Also:
Constant Field Values

START_UNINSTALLING

static final int START_UNINSTALLING
The uninstallation process is beginning for a bundle

Since:
3.2
See Also:
Constant Field Values

END_UNINSTALLING

static final int END_UNINSTALLING
The uninstallation process has ended for a bundle

Since:
3.2
See Also:
Constant Field Values
Method Detail

watchBundle

void watchBundle(Bundle bundle,
                 int type)
Receives notification that a lifecycle change is going to start or has ended.

Parameters:
bundle - the bundle for which the lifecycle change is occurring on.
type - the type of lifecycle change which is occurring.
Since:
3.2
See Also:
START_INSTALLING, END_INSTALLING, START_ACTIVATION, END_ACTIVATION, START_DEACTIVATION, END_DEACTIVATION, START_UNINSTALLING, END_UNINSTALLING