public Object addingService(ServiceReference ref) { Service service = (Service) this.bc.getService( ref ); System.out.println( "registering api : " + service + " : " + service.getClass().getInterfaces()[0] ); Dictionary dic = new Hashtable(); ServiceReference regServiceRef = this.activator.serviceRegistry.getReference(); for ( String key : regServiceRef.getPropertyKeys() ) { dic.put( key, regServiceRef.getProperty( key ) ); } dic.put( service.getClass().getInterfaces()[0].getName(), "true" ); activator.serviceRegistry.setProperties( dic ); ((ServiceRegistryImpl) bc.getService( regServiceRef )).registerLocator( service.getClass().getInterfaces()[0], new BundleContextInstantiator( this.bc, ref ) ); return service; }
public Object addingService(ServiceReference ref) { Service service = (Service) this.bc.getService( ref ); logger.info( "registering api : " + service + " : " + service.getClass().getInterfaces()[0] ); Dictionary dic = new Hashtable(); ServiceReference regServiceRef = this.activator.serviceRegistry.getReference(); for ( String key : regServiceRef.getPropertyKeys() ) { dic.put( key, regServiceRef.getProperty( key ) ); } dic.put( service.getClass().getInterfaces()[0].getName(), "true" ); activator.serviceRegistry.setProperties( dic ); ((ServiceRegistryImpl) bc.getService( regServiceRef )).registerLocator( service.getClass().getInterfaces()[0], new BundleContextInstantiator( this.bc, ref ) ); return service; }
public Object addingService(ServiceReference ref) { Service service = (Service) this.bc.getService( ref ); logger.info( "registering api : " + service + " : " + service.getClass().getInterfaces()[0] ); Dictionary dic = new Hashtable(); ServiceReference regServiceRef = this.activator.serviceRegistry.getReference(); for ( String key : regServiceRef.getPropertyKeys() ) { dic.put( key, regServiceRef.getProperty( key ) ); } dic.put( service.getClass().getInterfaces()[0].getName(), "true" ); activator.serviceRegistry.setProperties( dic ); ((ServiceRegistryImpl) bc.getService( regServiceRef )).registerLocator( service.getClass().getInterfaces()[0], new BundleContextInstantiator( this.bc, ref ) ); return service; }
public Object addingService(ServiceReference ref) { Service service = (Service) this.bc.getService( ref ); logger.info( "registering compiler : " + service + " : " + service.getClass().getInterfaces()[0] ); Dictionary dic = new Hashtable(); ServiceReference regServiceRef = this.activator.kbuilderReg.getReference(); for ( String key : regServiceRef.getPropertyKeys() ) { dic.put( key, regServiceRef.getProperty( key ) ); } dic.put( service.getClass().getInterfaces()[0].getName(), "true" ); activator.kbuilderReg.setProperties( dic ); ServiceRegistryImpl.getInstance().registerLocator( service.getClass().getInterfaces()[0], new BundleContextInstantiator( this.bc, ref ) ); return service; }