Package org.qi4j.api.service

Examples of org.qi4j.api.service.ServiceFinder


            {
                Energy4Java runtime = new Energy4Java();
                app = runtime.newApplication( new PluginApplicationAssembler( finder ) );

                app.activate();
                ServiceFinder pluginFinder = app.findModule( "Plugin layer", "Plugin module" );

                // TODO: Niclas wrote: No clue how all this Test is supposed to work, and can't figure out to create a workaround for this.
//                finder.findService(Plugin.class).metaInfo().add(ServiceFinder.class, pluginFinder);
            }
View Full Code Here


                new InvocationHandler()
                {
                    public Object invoke( Object proxy, Method method, Object[] args )
                        throws Throwable
                    {
                        ServiceFinder finder = serviceDescriptor.metaInfo( ServiceFinder.class );
                        if( finder == null )
                        {
                            throw new ServiceImporterException( "No ServiceFinder specified for imported service " + serviceDescriptor
                                .identity() );
                        }
                        Object service = finder.findService( mainType ).get();
                        return method.invoke( service, args );
                    }
                } );
        }
View Full Code Here

TOP

Related Classes of org.qi4j.api.service.ServiceFinder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.