org.qi4j.library.osgi
Interface FallbackStrategy


public interface FallbackStrategy

The fallback strategy is invoked when the OSGi service is not available and a method call is invoked.

The FallbackStrategy is declared on the OSGiServiceImporter service declaration, like;

     FallbackStrategy strategy = new MyStrategy();
     module.services( OSGiServiceImporter.class )
         .identifiedBy( "osgi" )
         .setMetaInfo( bundleContext )
         .setMetaInfo( strategy );
 


Method Summary
 java.lang.Object invoke(org.osgi.framework.ServiceReference reference, java.lang.reflect.Method method, java.lang.Object... args)
           
 

Method Detail

invoke

java.lang.Object invoke(org.osgi.framework.ServiceReference reference,
                        java.lang.reflect.Method method,
                        java.lang.Object... args)