+ System.out.println("=== Starting bundle");
+ context = aContext;
+ destinations = new ServiceTracker(aContext,
+ Destination.class.getName(), null);
+ destinations.open();
+ timer = new Timer();
+ timer.schedule(new TimerTask() {
+
+ @Override
+ public void run() {
+ Destination dest = (Destination) destinations.getService();
+ System.out.println(" === timer expired");
+ if (dest != null) {
+ System.out.println(" == calling");
+ dest.receive(null);
+ }
+ }
+ }, 1000, 1000);