Refine search
@Override @Activate protected void activate(BundleContext context) { super.activate(context); }
@Activate protected void activate(BundleContext bundleContext) { this.bundleContext = bundleContext; bundleContext.registerService(AppDeploymentEventListener.class, this, null); LOGGER.debug("Carbon UI Server activated."); }
/** * <p>startUp.</p> * * @param bundleContext a {@link org.osgi.framework.BundleContext} object. * @since 3.0.5 */ @Activate public void startUp(BundleContext bundleContext) { extendedBundleContext = new ExtendedBundle.ExtendedBundleContext(bundleContext); bundleContext.addBundleListener(this); }
@Activate protected void activate(ComponentContext ctx) throws InvalidSyntaxException { final BundleContext bundleContext = ctx.getBundleContext(); StringBuilder builder = new StringBuilder(); builder.append("(&("); builder.append(Constants.OBJECTCLASS).append("=").append(Importer.SERVICE_NAME).append(")"); builder.append("(displayName=*))"); Filter filter = bundleContext.createFilter(builder.toString()); this.tracker = new ServiceTracker(bundleContext, filter, null); this.tracker.open(); }
@Activate protected final void activate(final HealthCheckExecutorImplConfiguration configuration, final BundleContext bundleContext) { this.bundleContext = bundleContext; configure(configuration); try { this.bundleContext.addServiceListener(this, "(" + Constants.OBJECTCLASS + "=" + HealthCheck.class.getName() + ")"); } catch (final InvalidSyntaxException ise) { // this should really never happen as the expression above is constant throw new RuntimeException("Unexpected exception occured.", ise); } }
@Activate protected void activate(ComponentContext componentContext) { final BundleContext bundleContext = componentContext.getBundleContext(); File systemGraphFile = bundleContext.getDataFile(DATA_FILE_SYSTEM_GRAPH); boolean dataFileExisted = systemGraphFile.exists(); //yould be good to use IndexedGraph to be faster systemGraph = new FileGraph(systemGraphFile, parser, serializer); if (!dataFileExisted) { readConfigGraphFile(systemGraph); logger.info("Add initial configuration to system graph"); } }
@Activate protected final void activate(BundleContext bundleContext) { this.accessorReg = bundleContext.registerService(SyntheticWorkflowRunnerAccessor.class.getName(), new SyntheticWorkflowRunnerAccessor() { @Override public SyntheticWorkflowRunner getSyntheticWorkflowRunner() { return SyntheticWorkflowRunnerImpl.this; } }, new Hashtable()); }
@Activate public void activate(ComponentContext context, Configuration config) throws IOException { persistence = createAzurePersistence(config); registration = context.getBundleContext().registerService(SegmentNodeStorePersistence.class.getName(), persistence, new Properties()); }
@Activate protected void activate(Map<String, Object> props) { lastKnownInterfaceAddresses = Collections.emptyList(); modified(props); }
@Activate private void activate(BundleContext context, Configuration config) throws IOException { String dirPath = config.dir(); checkNotNull(dirPath, "Directory path not configured via 'dir'"); File dir = new File(dirPath); checkArgument(dir.exists(), "Directory %s does not exist", dir.getAbsolutePath()); textWriter = new DataStoreTextWriter(dir, true); reg = context.registerService(PreExtractedTextProvider.class.getName(), textWriter, null); }
@Activate protected void activate(final ComponentContext componentContext) { super.activate(componentContext.getBundleContext()); }
@Activate private void activate(BundleContext context, Configuration config) throws IOException { String dirPath = config.dir(); checkNotNull(dirPath, "Directory path not configured via 'dir'"); File dir = new File(dirPath); checkArgument(dir.exists(), "Directory %s does not exist", dir.getAbsolutePath()); textWriter = new DataStoreTextWriter(dir, true); reg = context.registerService(PreExtractedTextProvider.class.getName(), textWriter, null); }
@Activate public void activate(@Nullable Map<String, Object> properties) { watcher = Executors.newSingleThreadScheduledExecutor(); manager = new SafeCallManagerImpl(watcher, getScheduler(), false); modified(properties); }
@Activate private void activate(BundleContext context, Configuration config) throws IOException { String dirPath = config.dir(); checkNotNull(dirPath, "Directory path not configured via 'dir'"); File dir = new File(dirPath); checkArgument(dir.exists(), "Directory %s does not exist", dir.getAbsolutePath()); textWriter = new DataStoreTextWriter(dir, true); reg = context.registerService(PreExtractedTextProvider.class.getName(), textWriter, null); }
@Activate protected void activate(ComponentContext componentContext) { eventHandler = new ThreadedEventHandler(typedEventSubscribers, typedEventFactories, safeCaller); eventHandler.open(); }
@Activate @SuppressWarnings("squid:S1149") protected void activate(final BundleContext ctx, final Config config) { this.appender = constructAppender(config); final String[] loggers = config.loggers(); Dictionary<String, Object> props = new Hashtable<String, Object>(); props.put("loggers", loggers); appenderRegistration = ctx.registerService(Appender.class.getName(), appender, props); }
@Activate @SuppressWarnings("unchecked") protected void activate(ComponentContext componentContext) { initDimensionMap(); modified((Map<String, Object>) componentContext.getProperties()); this.resourceBundleTracker = new ResourceBundleTracker(componentContext.getBundleContext(), this); this.resourceBundleTracker.open(); }
@Activate private void activate(BundleContext context, Configuration config) { this.bundleContext = context; statisticsProvider = createProvider(config.providerType()); if (statisticsProvider != null) { regs.add(context.registerService(StatisticsProvider.class.getName(), statisticsProvider, null)); } }
/** * DS activate (for trace logs) */ @Activate protected void activate(ComponentContext context, Map<String, Object> config) { }
@Activate private void activate(BundleContext context, Configuration config) { this.bundleContext = context; statisticsProvider = createProvider(config.providerType()); if (statisticsProvider != null) { regs.add(context.registerService(StatisticsProvider.class.getName(), statisticsProvider, null)); } }