use of org.apache.sling.installer.api.event.InstallationListener in project sling by apache.
the class UpdateHandlerTest method getInstallerListenerBarrier.
private Barrier getInstallerListenerBarrier() {
final Barrier b = new Barrier(2);
final InstallationListener il = new InstallationListener() {
public void onEvent(final InstallationEvent event) {
if (event.getType() == InstallationEvent.TYPE.PROCESSED) {
b.block();
}
}
};
b.reg = bundleContext.registerService(InstallationListener.class.getName(), il, null);
return b;
}
use of org.apache.sling.installer.api.event.InstallationListener in project sling by apache.
the class ConfigInstallTest method setUp.
@Before
public void setUp() {
installationEvents = 0;
setupInstaller();
events.clear();
serviceRegistrations.clear();
serviceRegistrations.add(bundleContext.registerService(ConfigurationListener.class.getName(), this, null));
final InstallationListener il = new InstallationListener() {
@Override
public void onEvent(InstallationEvent event) {
installationEvents++;
}
};
serviceRegistrations.add(bundleContext.registerService(InstallationListener.class.getName(), il, null));
}
Aggregations