org.apache.felix.ipojo
Class Extender

java.lang.Object
  extended by org.apache.felix.ipojo.Extender
All Implemented Interfaces:
EventListener, BundleActivator, BundleListener, SynchronousBundleListener

public class Extender
extends Object
implements SynchronousBundleListener, BundleActivator

iPOJO Extender. This class listens bundle arrivals and departures in order to detect and manage iPOJO powered bundles. This class creates factories and ask for instance creation.

Author:
Felix Project Team
See Also:
SynchronousBundleListener, BundleActivator

Constructor Summary
Extender()
           
 
Method Summary
 void bundleChanged(BundleEvent event)
          Bundle Listener Notification.
 BundleContext getBundleContext(Bundle bundle)
          Computes the bundle context from the bundle class by introspection.
static BundleContext getIPOJOBundleContext()
          Gets iPOJO bundle context.
 void start(BundleContext context)
          iPOJO Start method.
 void stop(BundleContext context)
          Stops the iPOJO Bundle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Extender

public Extender()
Method Detail

bundleChanged

public void bundleChanged(BundleEvent event)
Bundle Listener Notification.

Specified by:
bundleChanged in interface BundleListener
Parameters:
event - the bundle event.
See Also:
BundleListener.bundleChanged(org.osgi.framework.BundleEvent)

start

public void start(BundleContext context)
iPOJO Start method.

Specified by:
start in interface BundleActivator
Parameters:
context - the iPOJO bundle context.
See Also:
BundleActivator.start(org.osgi.framework.BundleContext)

stop

public void stop(BundleContext context)
Stops the iPOJO Bundle.

Specified by:
stop in interface BundleActivator
Parameters:
context - the bundle context.
See Also:
BundleActivator.stop(org.osgi.framework.BundleContext)

getIPOJOBundleContext

public static BundleContext getIPOJOBundleContext()
Gets iPOJO bundle context.

Returns:
the iPOJO Bundle Context

getBundleContext

public BundleContext getBundleContext(Bundle bundle)
Computes the bundle context from the bundle class by introspection.

Parameters:
bundle - the bundle.
Returns:
the bundle context object or null if not found.


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