de.twenty11.skysail.server.listener
Class SkysailApplicationServiceListener

java.lang.Object
  extended by de.twenty11.skysail.server.listener.SkysailApplicationServiceListener
All Implemented Interfaces:
EventListener, org.osgi.framework.ServiceListener

public class SkysailApplicationServiceListener
extends Object
implements org.osgi.framework.ServiceListener

A service listener which takes care of ApplicationDescriptor related services.

Author:
carsten

Constructor Summary
SkysailApplicationServiceListener(org.osgi.framework.BundleContext context, RestletOsgiApplication restletApp)
          Constructor which needs the bundleContext and the RestletOsgiApplication.
SkysailApplicationServiceListener(org.osgi.framework.BundleContext context, RestletOsgiApplication restletApp, boolean addBundleName)
          Constructor which needs the bundleContext and the RestletOsgiApplication.
SkysailApplicationServiceListener(RestletOsgiApplication restletApp)
           
 
Method Summary
 void serviceChanged(org.osgi.framework.ServiceEvent event)
          This method adds, removes or modifies the list of applicationDescriptors.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SkysailApplicationServiceListener

public SkysailApplicationServiceListener(RestletOsgiApplication restletApp)

SkysailApplicationServiceListener

public SkysailApplicationServiceListener(org.osgi.framework.BundleContext context,
                                         RestletOsgiApplication restletApp)
Constructor which needs the bundleContext and the RestletOsgiApplication. When this Listener is instantiated, the bundleContext is queried for all the already existing serviceReferences to the de.twenty11.skysail.server.UrlMapper class. The mappings provided by those classes are then added to the applications router. This is done to make sure that all the mappings from running bundles are taken into account even though the restletosgi bundle might have been started later.

Parameters:
context - the osgi bundle context
restletApp - the restletOsgiApplication

SkysailApplicationServiceListener

public SkysailApplicationServiceListener(org.osgi.framework.BundleContext context,
                                         RestletOsgiApplication restletApp,
                                         boolean addBundleName)
Constructor which needs the bundleContext and the RestletOsgiApplication.

Parameters:
context - the osgi bundle context
restletApp - the restletOsgiApplication
Method Detail

serviceChanged

public final void serviceChanged(org.osgi.framework.ServiceEvent event)
This method adds, removes or modifies the list of applicationDescriptors.

Specified by:
serviceChanged in interface org.osgi.framework.ServiceListener
Parameters:
event - the serviceEvent


Copyright © 2011-2013. All Rights Reserved.