org.apache.felix.webconsole.plugins.upnp.internal
Class Activator

java.lang.Object
  extended by org.apache.felix.webconsole.plugins.upnp.internal.Activator
All Implemented Interfaces:
BundleActivator, ServiceTrackerCustomizer

public class Activator
extends Object
implements BundleActivator, ServiceTrackerCustomizer

Activator is the main starting class.


Constructor Summary
Activator()
           
 
Method Summary
 Object addingService(ServiceReference reference)
          A service is being added to the ServiceTracker.
 void modifiedService(ServiceReference reference, Object service)
          A service tracked by the ServiceTracker has been modified.
 void removedService(ServiceReference reference, Object service)
          A service tracked by the ServiceTracker has been removed.
 void start(BundleContext context)
          Called when this bundle is started so the Framework can perform the bundle-specific activities necessary to start this bundle.
 void stop(BundleContext context)
          Called when this bundle is stopped so the Framework can perform the bundle-specific activities necessary to stop the bundle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Activator

public Activator()
Method Detail

start

public final void start(BundleContext context)
                 throws Exception
Description copied from interface: BundleActivator
Called when this bundle is started so the Framework can perform the bundle-specific activities necessary to start this bundle. This method can be used to register services or to allocate any resources that this bundle needs.

This method must complete and return to its caller in a timely manner.

Specified by:
start in interface BundleActivator
Parameters:
context - The execution context of the bundle being started.
Throws:
Exception - If this method throws an exception, this bundle is marked as stopped and the Framework will remove this bundle's listeners, unregister all services registered by this bundle, and release all services used by this bundle.
See Also:
BundleActivator.start(org.osgi.framework.BundleContext)

stop

public final void stop(BundleContext context)
                throws Exception
Description copied from interface: BundleActivator
Called when this bundle is stopped so the Framework can perform the bundle-specific activities necessary to stop the bundle. In general, this method should undo the work that the BundleActivator.start method started. There should be no active threads that were started by this bundle when this bundle returns. A stopped bundle must not call any Framework objects.

This method must complete and return to its caller in a timely manner.

Specified by:
stop in interface BundleActivator
Parameters:
context - The execution context of the bundle being stopped.
Throws:
Exception - If this method throws an exception, the bundle is still marked as stopped, and the Framework will remove the bundle's listeners, unregister all services registered by the bundle, and release all services used by the bundle.
See Also:
BundleActivator.stop(org.osgi.framework.BundleContext)

modifiedService

public final void modifiedService(ServiceReference reference,
                                  Object service)
Description copied from interface: ServiceTrackerCustomizer
A service tracked by the ServiceTracker has been modified.

This method is called when a service being tracked by the ServiceTracker has had it properties modified.

Specified by:
modifiedService in interface ServiceTrackerCustomizer
Parameters:
reference - The reference to the service that has been modified.
service - The service object for the specified referenced service.
See Also:
ServiceTrackerCustomizer.modifiedService(org.osgi.framework.ServiceReference, java.lang.Object)

addingService

public final Object addingService(ServiceReference reference)
Description copied from interface: ServiceTrackerCustomizer
A service is being added to the ServiceTracker.

This method is called before a service which matched the search parameters of the ServiceTracker is added to the ServiceTracker. This method should return the service object to be tracked for the specified ServiceReference. The returned service object is stored in the ServiceTracker and is available from the getService and getServices methods.

Specified by:
addingService in interface ServiceTrackerCustomizer
Parameters:
reference - The reference to the service being added to the ServiceTracker.
Returns:
The service object to be tracked for the specified referenced service or null if the specified referenced service should not be tracked.
See Also:
ServiceTrackerCustomizer.addingService(org.osgi.framework.ServiceReference)

removedService

public final void removedService(ServiceReference reference,
                                 Object service)
Description copied from interface: ServiceTrackerCustomizer
A service tracked by the ServiceTracker has been removed.

This method is called after a service is no longer being tracked by the ServiceTracker.

Specified by:
removedService in interface ServiceTrackerCustomizer
Parameters:
reference - The reference to the service that has been removed.
service - The service object for the specified referenced service.
See Also:
ServiceTrackerCustomizer.removedService(org.osgi.framework.ServiceReference, java.lang.Object)


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.