public Service setImplementation(Object implementation) { m_delegate.setImplementation(implementation); return this; }
public void init(BundleContext context, DependencyManager manager) throws Exception { manager.add(createComponent() .setInterface(LogService.class.getName(), null) .setImplementation(Logger.class) ); }
public void init(BundleContext context, DependencyManager manager) throws Exception { manager.add(createComponent() .setInterface(LogService.class.getName(), null) .setImplementation(Logger.class) ); }
@Override public void init(BundleContext context, DependencyManager manager) throws Exception { Properties props = new Properties(); props.put(UIExtensionFactory.EXTENSION_POINT_KEY, UIExtensionFactory.EXTENSION_POINT_VALUE_TARGET); props.put(Constants.SERVICE_RANKING, Integer.valueOf(200)); manager.add(createComponent().setInterface(UIExtensionFactory.class.getName(), props) .setImplementation(TargetManagementExtension.class) .add(createServiceDependency() .setService(RepositoryAdmin.class) .setRequired(true)) ); }
private void registerConfigurationService() { Dictionary<String, Object> properties = new Hashtable<String, Object>(); properties.put(Constants.SERVICE_PID, HttpAdminConstants.SERVICE_PID); Component component = createComponent() .setInterface(ManagedService.class.getName(), properties) .setImplementation(this) .setAutoConfig(DependencyManager.class, false) .setAutoConfig(Component.class, false); m_configurationComponent = component; m_dependencyManager.add(component); }
@Override public void init(BundleContext context, DependencyManager manager) throws Exception { manager.add(createComponent().setInterface( new String[] { AuthenticationService.class.getName() }, null).setImplementation( AuthenticationManager.instance())); ClientManager cm = new ClientManager(); manager.add(createComponent().setInterface(new String[] { ClientService.class.getName() }, null).setImplementation(cm)); context.registerService(ManagedService.class.getName(), cm, addPid(ClientManager.defaults)); context.registerService(ManagedService.class.getName(), AuthenticationManager.instance(), addPid(AuthenticationManager.defaults)); }
private void registerConfigurationService() { Dictionary<String, Object> properties = new Hashtable<String, Object>(); properties.put(Constants.SERVICE_PID, CONFIG_PID); Component component = createComponent() .setInterface(ManagedService.class.getName(), properties) .setImplementation(this) .setAutoConfig(BundleContext.class, false) .setAutoConfig(DependencyManager.class, false) .setAutoConfig(Component.class, false); m_configuration = component; m_manager.add(component); }
@Override public void init(BundleContext context, DependencyManager manager) throws Exception { manager.add(createComponent() .setInterface(ManagedServiceFactory.class.getName(), new Hashtable<String, String>(Collections.singletonMap(Constants.SERVICE_PID, ManagedProcessEngineFactory.SERVICE_PID))) .setImplementation(ManagedProcessEngineFactoryImpl.class).add(createBundleDependency().setBundle(context.getBundle()).setRequired(true))); }
@Override public void init(BundleContext context, DependencyManager manager) throws Exception { Dictionary<String, String> props = new Hashtable<String, String>(); props.put("name", "mappingservice"); manager.add(createComponent().setInterface(new String[] { ILispmappingNorthbound.class.getName() }, props) .setImplementation(LispMappingNorthbound.class) .add(createServiceDependency().setService(IFlowMapping.class) .setCallbacks("setFlowMappingService", "unsetFlowMappingService").setRequired(true))); LOG.info("LISP Northbound Service is up!"); }
public void init(BundleContext context, DependencyManager manager) throws Exception { m_context = context; m_manager = manager; Properties props = new Properties(); props.put(Constants.SERVICE_PID, "org.apache.ace.gateway.log.store.factory"); manager.add(createComponent() .setInterface(ManagedServiceFactory.class.getName(), props) .setImplementation(this) .add(createServiceDependency().setService(LogService.class).setRequired(false))); }
public void init(BundleContext context, DependencyManager manager) throws Exception { m_manager = manager; Properties props = new Properties(); props.put(Constants.SERVICE_PID, "org.apache.ace.gateway.log.factory"); manager.add(createComponent() .setInterface(ManagedServiceFactory.class.getName(), props) .setImplementation(this) .add(createServiceDependency().setService(LogService.class).setRequired(false))); }
@Override public void init(BundleContext context, DependencyManager manager) throws Exception { Properties props = new Properties(); props.put(SchedulerConstants.SCHEDULER_NAME_KEY, RepositoryReplicationTask.class.getName()); props.put(SchedulerConstants.SCHEDULER_DESCRIPTION_KEY, "Synchronizes repositories."); manager.add(createComponent() .setInterface(Runnable.class.getName(), props) .setImplementation(RepositoryReplicationTask.class) .add(createServiceDependency().setService(Discovery.class).setRequired(true)) .add(createServiceDependency().setService(LogService.class).setRequired(false)) ); }
@Override public void init(BundleContext context, DependencyManager manager) throws Exception { // publish access manager accessManager = manager.createComponent(); accessManager.setInterface(AccessManager.class.getName(), null); accessManager.setImplementation(LocalAccessManager.class); accessManager.add(createServiceDependency().setService(ExecutorManager.class).setRequired(true)); manager.add(accessManager); // register OIDC application context.registerService(HubWebApplication.class.getName(), new HubWebApplication("", AuthApplication.class), null); }
@Override public void init(BundleContext context, DependencyManager manager) throws Exception { manager.add(createComponent() .setInterface(StreamGenerator.class.getName(), null) .setImplementation(StreamGeneratorImpl.class) .add(createServiceDependency() .setService(DeploymentProvider.class) .setRequired(true) ) ); }
public synchronized void init(BundleContext context, DependencyManager manager) throws Exception { manager.add(createComponent() .setInterface(new String[] {Identification.class.getName()}, null) .setImplementation(IfconfigIdentification.class) .add(createServiceDependency().setService(LogService.class).setRequired(false)) ); }
@Override public void init(BundleContext context, DependencyManager manager) throws Exception { manager.add(createComponent() .setInterface(MetadataGenerator.class.getName(), null) .setImplementation(BIndexMetadataGenerator.class) .add(createServiceDependency() .setService(LogService.class) .setRequired(false))); }
@Override public void init(BundleContext context, DependencyManager manager) throws Exception { for (int i = 0; i < m_activators.length; i++) { BundleActivator a = m_activators[i]; a.start(context); } manager.add(createComponent() .setImplementation(this) .add(createServiceDependency() .setService(ConfigurationAdmin.class) .setRequired(true))); }
@Override public void init(BundleContext context, DependencyManager manager) throws Exception { manager.add(createComponent() .setInterface(DeploymentProvider.class.getName(), null) .setImplementation(RepositoryBasedProvider.class) .add(createConfigurationDependency() .setPid(PID) ) .add(createServiceDependency() .setService(LogService.class) .setRequired(false))); }
/** * {@inheritDoc} */ @Override public void init( final BundleContext aContext, final DependencyManager aManager ) throws Exception { aManager.add( createComponent().setInterface( Configurator.class.getName(), null ) .setImplementation( ConfiguratorImpl.class ) .add( createServiceDependency().setService( ConfigurationAdmin.class ).setRequired( true ) ) .add( createServiceDependency().setService( LogService.class ).setRequired( false ) ) ); } }
@Override public void init(BundleContext context, DependencyManager manager) throws Exception { manager.add(createComponent() .setImplementation(this) .add(createServiceDependency().setService(UserAdmin.class).setRequired(true)) .add(createServiceDependency().setService(LogService.class).setRequired(false))); }