@Override public String getSlingId() { if (settingsService==null) { return null; } return settingsService.getSlingId(); }
/** * Activate this component. */ @Activate protected void activate() { // Set the application id and the thread pool Environment.APPLICATION_ID = this.settingsService.getSlingId(); Environment.THREAD_POOL = this.threadPool; }
@Activate protected void activate() { slingId = settingsService.getSlingId(); }
@PostConstruct protected void init() { log.info("Reached init of HelloWorldModel"); message = "\tHello World!\n"; message += "\tThis is instance: " + settings.getSlingId() + "\n"; message += "\tResource type is: " + resourceType + "\n"; message += "\tUser id is " + resourceResolver.getUserID() + "\n"; }
@Activate protected void activate(final ComponentContext context) { slingId = slingSettingsService.getSlingId(); logger = LoggerFactory.getLogger(this.getClass().getCanonicalName() + "." + slingId); this.context = context; activated = true; // once activated, register the eventHandler so that we can // start receiving and processing votings... registerEventHandler(); logger.info("activated: activated ("+slingId+")"); }
@Activate protected void activate(final ComponentContext context) { this.slingId = slingSettingsService.getSlingId(); this.context = context; if (logger.isDebugEnabled()) { logger.debug("activated. slingid=" + slingId + ", discoveryservice=" + discoveryService); } registerEventHandler(); }
/** * Try to get the service and the Sling ID */ private synchronized void retainService() { final ServiceReference reference = bundleContext.getServiceReference(SETTINGS_NAME); if ( reference != null ) { final SlingSettingsService service = (SlingSettingsService)bundleContext.getService(reference); if ( service != null ) { QuartzJobExecutor.SLING_ID = service.getSlingId(); this.bundleContext.ungetService(reference); // stop the listener, we don't need it anymore this.stop(); } } }
this.ownRootPath = ownRootPath; this.resourceResolverFactory = rrFactory; this.slingId = settings.getSlingId(); this.cleanupPeriod = cleanupPeriod;
@Activate protected void activate(ComponentContext context) { synchronized(lock) { this.context = context; slingId = getSlingSettingsService().getSlingId(); NAME = "discovery.connectors.common.runner." + slingId; doActivate(); activated = true; issueHeartbeat(); } }
@Activate protected void activate(final BundleContext bundleContext, final Config props) { final String ownRootPath = props.repository_path().concat("/").concat(settings.getSlingId()); this.receiver = new DistributedEventReceiver(bundleContext, props.repository_path(), ownRootPath, props.cleanup_period(), this.resourceResolverFactory, this.settings); this.sender = new DistributedEventSender(bundleContext, props.repository_path(), ownRootPath, this.resourceResolverFactory, this.eventAdmin); }
this.slingId = this.settingsService.getSlingId(); this.bundleContentLoader = new BundleContentLoader(this, contentReaderWhiteboard);
slingId = settingsService.getSlingId();