org.apache.camel.impl.osgi
Class Activator

java.lang.Object
  extended by org.apache.camel.impl.osgi.Activator
All Implemented Interfaces:
BundleTrackerCustomizer, org.osgi.framework.BundleActivator

public class Activator
extends Object
implements org.osgi.framework.BundleActivator, BundleTrackerCustomizer


Nested Class Summary
protected static class Activator.BaseResolver<T>
           
protected static class Activator.BaseService
           
protected static class Activator.BundleComponentResolver
           
protected static class Activator.BundleDataFormatResolver
           
protected static class Activator.BundleLanguageResolver
           
protected static class Activator.BundleMetaLanguageResolver
           
protected static class Activator.BundleTypeConverterLoader
           
 
Field Summary
static String META_INF_COMPONENT
           
static String META_INF_DATAFORMAT
           
static String META_INF_FALLBACK_TYPE_CONVERTER
           
static String META_INF_LANGUAGE
           
static String META_INF_LANGUAGE_RESOLVER
           
static String META_INF_TYPE_CONVERTER
           
 
Constructor Summary
Activator()
           
 
Method Summary
 Object addingBundle(org.osgi.framework.Bundle bundle, org.osgi.framework.BundleEvent event)
          A bundle is being added to the BundleTracker.
protected static boolean checkCompat(org.osgi.framework.Bundle bundle, Class<?> clazz)
           
protected static Set<String> getConverterPackages(URL resource)
           
protected static Properties loadProperties(URL url)
           
 void modifiedBundle(org.osgi.framework.Bundle bundle, org.osgi.framework.BundleEvent event, Object object)
          A bundle tracked by the BundleTracker has been modified.
protected  void registerComponents(org.osgi.framework.Bundle bundle, List<Activator.BaseService> resolvers)
           
protected  void registerDataFormats(org.osgi.framework.Bundle bundle, List<Activator.BaseService> resolvers)
           
protected  void registerLanguages(org.osgi.framework.Bundle bundle, List<Activator.BaseService> resolvers)
           
protected  void registerTypeConverterLoader(org.osgi.framework.Bundle bundle, List<Activator.BaseService> resolvers)
           
 void removedBundle(org.osgi.framework.Bundle bundle, org.osgi.framework.BundleEvent event, Object object)
          A bundle tracked by the BundleTracker has been removed.
 void start(org.osgi.framework.BundleContext context)
           
 void stop(org.osgi.framework.BundleContext context)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

META_INF_COMPONENT

public static final String META_INF_COMPONENT
See Also:
Constant Field Values

META_INF_LANGUAGE

public static final String META_INF_LANGUAGE
See Also:
Constant Field Values

META_INF_LANGUAGE_RESOLVER

public static final String META_INF_LANGUAGE_RESOLVER
See Also:
Constant Field Values

META_INF_DATAFORMAT

public static final String META_INF_DATAFORMAT
See Also:
Constant Field Values

META_INF_TYPE_CONVERTER

public static final String META_INF_TYPE_CONVERTER
See Also:
Constant Field Values

META_INF_FALLBACK_TYPE_CONVERTER

public static final String META_INF_FALLBACK_TYPE_CONVERTER
See Also:
Constant Field Values
Constructor Detail

Activator

public Activator()
Method Detail

start

public void start(org.osgi.framework.BundleContext context)
           throws Exception
Specified by:
start in interface org.osgi.framework.BundleActivator
Throws:
Exception

stop

public void stop(org.osgi.framework.BundleContext context)
          throws Exception
Specified by:
stop in interface org.osgi.framework.BundleActivator
Throws:
Exception

addingBundle

public Object addingBundle(org.osgi.framework.Bundle bundle,
                           org.osgi.framework.BundleEvent event)
Description copied from interface: BundleTrackerCustomizer
A bundle is being added to the BundleTracker.

This method is called before a bundle which matched the search parameters of the BundleTracker is added to the BundleTracker. This method should return the object to be tracked for the specified Bundle. The returned object is stored in the BundleTracker and is available from the getObject method.

Specified by:
addingBundle in interface BundleTrackerCustomizer
Parameters:
bundle - The Bundle being added to the BundleTracker.
event - The bundle event which caused this customizer method to be called or null if there is no bundle event associated with the call to this method.
Returns:
The object to be tracked for the specified Bundle object or null if the specified Bundle object should not be tracked.

modifiedBundle

public void modifiedBundle(org.osgi.framework.Bundle bundle,
                           org.osgi.framework.BundleEvent event,
                           Object object)
Description copied from interface: BundleTrackerCustomizer
A bundle tracked by the BundleTracker has been modified.

This method is called when a bundle being tracked by the BundleTracker has had its state modified.

Specified by:
modifiedBundle in interface BundleTrackerCustomizer
Parameters:
bundle - The Bundle whose state has been modified.
event - The bundle event which caused this customizer method to be called or null if there is no bundle event associated with the call to this method.
object - The tracked object for the specified bundle.

removedBundle

public void removedBundle(org.osgi.framework.Bundle bundle,
                          org.osgi.framework.BundleEvent event,
                          Object object)
Description copied from interface: BundleTrackerCustomizer
A bundle tracked by the BundleTracker has been removed.

This method is called after a bundle is no longer being tracked by the BundleTracker.

Specified by:
removedBundle in interface BundleTrackerCustomizer
Parameters:
bundle - The Bundle that has been removed.
event - The bundle event which caused this customizer method to be called or null if there is no bundle event associated with the call to this method.
object - The tracked object for the specified bundle.

registerComponents

protected void registerComponents(org.osgi.framework.Bundle bundle,
                                  List<Activator.BaseService> resolvers)

registerLanguages

protected void registerLanguages(org.osgi.framework.Bundle bundle,
                                 List<Activator.BaseService> resolvers)

registerDataFormats

protected void registerDataFormats(org.osgi.framework.Bundle bundle,
                                   List<Activator.BaseService> resolvers)

registerTypeConverterLoader

protected void registerTypeConverterLoader(org.osgi.framework.Bundle bundle,
                                           List<Activator.BaseService> resolvers)

loadProperties

protected static Properties loadProperties(URL url)

checkCompat

protected static boolean checkCompat(org.osgi.framework.Bundle bundle,
                                     Class<?> clazz)

getConverterPackages

protected static Set<String> getConverterPackages(URL resource)


Apache CAMEL