com.buglabs.osgi.sewing.servicetracker
Class SewingServiceTracker

java.lang.Object
  extended by com.buglabs.application.AbstractServiceTracker
      extended by com.buglabs.osgi.sewing.servicetracker.SewingServiceTracker
All Implemented Interfaces:
IServiceProvider

public class SewingServiceTracker
extends AbstractServiceTracker

Service tracker for the BugApp Bundle;


Field Summary
 
Fields inherited from class com.buglabs.application.AbstractServiceTracker
context, services
 
Constructor Summary
SewingServiceTracker(BundleContext context)
           
 
Method Summary
 boolean canStart()
          Determines if the application can start.
 void doStart()
          If canStart returns true this method is called to start the application.
 void doStop()
          Called when a service that this application depends is unregistered.
 void initServices()
          Allows the user to set the service dependencies by adding them to services list returned by getServices().
 
Methods inherited from class com.buglabs.application.AbstractServiceTracker
addingService, addServiceFilters, getBundleContext, getService, getServicePropertiesMap, getServices, hasStarted, modifiedService, removedService, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SewingServiceTracker

public SewingServiceTracker(BundleContext context)
Method Detail

canStart

public boolean canStart()
Determines if the application can start.

Overrides:
canStart in class AbstractServiceTracker

doStart

public void doStart()
If canStart returns true this method is called to start the application. Place your fun logic here.

Specified by:
doStart in class AbstractServiceTracker

doStop

public void doStop()
Called when a service that this application depends is unregistered.

Specified by:
doStop in class AbstractServiceTracker

initServices

public void initServices()
Allows the user to set the service dependencies by adding them to services list returned by getServices(). i.e.nl getServices().add(MyService.class.getName());

Overrides:
initServices in class AbstractServiceTracker