// -- Set up event dispatcher
EventDispatcher ed = new EventDispatcher(logger, registry);
// -- Register some listeners
final List fired = Collections.synchronizedList(new ArrayList());
ServiceListener sl1 = new ServiceListener()
{
public void serviceChanged(ServiceEvent arg0)
{
fired.add(this);
}
};
ed.addListener(b1.getBundleContext(), ServiceListener.class, sl1, null);
ServiceListener sl2 = new ServiceListener()
{
public void serviceChanged(ServiceEvent arg0)
{
fired.add(this);
}
};
ed.addListener(b2.getBundleContext(), ServiceListener.class, sl2, null);
ServiceListener sl3 = new ServiceListener()
{
public void serviceChanged(ServiceEvent arg0)
{
fired.add(this);
}