@Override public void addStartStep(ILifecycleComponent owner, ILifecycleComponent component, boolean require) { if (component != null) { addStep(new StartComponentLifecycleStep(owner, component, require)); } else { owner.getLogger().warn("Skipping 'start' step for null component."); } }
/** * Start tenant services. * * @param start * @throws SiteWhereException */ protected void startTenantServices(ICompositeLifecycleStep start) throws SiteWhereException { // Start asset module manager. start.addStep(new StartComponentLifecycleStep(this, getAssetModuleManager(), "Started asset module manager", "Asset module manager startup failed.", true)); // Start search provider manager. start.addStep(new StartComponentLifecycleStep(this, getSearchProviderManager(), "Started search provider manager", "Search provider manager startup failed.", true)); // Start event processing subsystem. start.addStep(new StartComponentLifecycleStep(this, getEventProcessing(), "Started event processing subsystem", "Event processing subsystem startup failed.", true)); // Start device communication subsystem. start.addStep(new StartComponentLifecycleStep(this, getDeviceCommunication(), "Started device communication subsystem", "Device communication subsystem startup failed.", true)); // Start schedule manager. start.addStep(new StartComponentLifecycleStep(this, getScheduleManager(), "Started schedule manager", "Schedule manager startup failed.", true)); }
/** * Start tenant management API implementations. * * @param start * @throws SiteWhereException */ protected void startManagementImplementations(ICompositeLifecycleStep start) throws SiteWhereException { // Start asset management cache provider. start.addStep(new StartComponentLifecycleStep(this, getAssetManagementCacheProvider(), "Started asset management cache provider", "Asset management cache provider startup failed.", true)); // Start asset management. start.addStep(new StartComponentLifecycleStep(this, getAssetManagement(), "Started asset management", "Asset management startup failed.", true)); // Start device management cache provider. start.addStep(new StartComponentLifecycleStep(this, getDeviceManagementCacheProvider(), "Started device management cache provider", "Device management cache provider startup failed.", true)); // Start device management. start.addStep(new StartComponentLifecycleStep(this, getDeviceManagement(), "Started device management", "Device management startup failed.", true)); // Start device management. start.addStep(new StartComponentLifecycleStep(this, getDeviceEventManagement(), "Started device event management", "Device event management startup failed.", true)); // Start device management. start.addStep(new StartComponentLifecycleStep(this, getScheduleManagement(), "Started schedule management", "Schedule management startup failed.", true)); }
/** * Start base tenant services. * * @param start * @throws SiteWhereException */ protected void startBaseServices(ICompositeLifecycleStep start) throws SiteWhereException { // Start Groovy configuration. start.addStep(new StartComponentLifecycleStep(this, getGroovyConfiguration(), "Started tenant Groovy script engine", "Groovy configuration startup failed.", true)); // Start lifecycle components. for (ILifecycleComponent component : getRegisteredLifecycleComponents()) { start.addStep(new StartComponentLifecycleStep(this, component, "Started " + component.getComponentName(), component.getComponentName() + " startup failed.", true)); } }
/** * Start basic services required by other components. * * @param start * @throws SiteWhereException */ protected void startBaseServices(ICompositeLifecycleStep start) throws SiteWhereException { // Organizes steps for starting base services. ICompositeLifecycleStep base = new CompositeLifecycleStep("Started Base Services"); // Start the Groovy configuration. base.addStep(new StartComponentLifecycleStep(this, getGroovyConfiguration(), "Started Groovy scripting engine", "Groovy startup failed.", true)); // Start all lifecycle components. for (ILifecycleComponent component : getRegisteredLifecycleComponents()) { base.addStep(new StartComponentLifecycleStep(this, component, "Started " + component.getComponentName(), component.getComponentName() + " startup failed.", true)); } // Start the tenant template manager. base.addStep(new StartComponentLifecycleStep(this, getTenantTemplateManager(), "Started tenant template manager", "Tenant template manager startup failed.", true)); start.addStep(base); }
mgmt.addStep(new StartComponentLifecycleStep(this, getUserManagement(), "Started user management implementation", "User management startup failed.", true)); mgmt.addStep(new StartComponentLifecycleStep(this, getTenantManagement(), "Started tenant management implementation", "Tenant management startup failed", true));