Examples of StartupHandler


Examples of de.iritgo.aktera.startup.StartupHandler

    }
    ModelTools.releaseModelRequest(model);

    for (Configuration config : sortedConfigs)
    {
      StartupHandler startup = null;

      String id = config.getAttribute("id");

      if (config.getAttribute("class", null) != null)
      {
        String className = config.getAttribute("class", null);

        startup = (StartupHandler) Class.forName(className).newInstance();
      }
      else if (config.getAttribute("bean", null) != null)
      {
        String beanName = config.getAttribute("bean", null);

        startup = (StartupHandler) KeelContainer.defaultContainer().getSpringBean(beanName);
      }

      if (startup instanceof AbstractStartupHandler)
      {
        if (((AbstractStartupHandler) startup).getLogger() == null)
        {
          ((AbstractStartupHandler) startup).setLogger(log);
        }

        if (((AbstractStartupHandler) startup).getConfiguration() == null)
        {
          ((AbstractStartupHandler) startup).setConfiguration(config);
        }
      }

      try
      {
        log.info("Starting component " + id);
        startup.startup();
      }
      catch (StartupException x)
      {
        log.error("Startup exception in handler '" + id + "': " + x);
      }
View Full Code Here

Examples of de.iritgo.aktera.startup.StartupHandler

    Collections.reverse(sortedConfigs);

    for (Configuration config : sortedConfigs)
    {
      StartupHandler startup = null;

      String id = config.getAttribute("id");

      if (config.getAttribute("class", null) != null)
      {
        String className = config.getAttribute("class", null);

        startup = (StartupHandler) Class.forName(className).newInstance();
      }
      else if (config.getAttribute("bean", null) != null)
      {
        String beanName = config.getAttribute("bean", null);

        startup = (StartupHandler) KeelContainer.defaultContainer().getSpringBean(beanName);
      }

      if (startup instanceof AbstractStartupHandler)
      {
        ((AbstractStartupHandler) startup).setLogger(log);
        ((AbstractStartupHandler) startup).setConfiguration(config);
      }

      try
      {
        log.info("Stopping component " + id);
        startup.shutdown();
      }
      catch (ShutdownException x)
      {
        log.error("Shutdown exception in handler '" + id + "': " + x);
      }
View Full Code Here

Examples of org.apache.sling.launchpad.api.StartupHandler

        final org.osgi.service.cm.Configuration c2 = this.configAdmin.getConfiguration("org.apache.sling.event.impl.jobs.jcr.PersistenceHandler", null);
        Dictionary<String, Object> p2 = new Hashtable<String, Object>();
        p2.put(JobManagerConfiguration.PROPERTY_BACKGROUND_LOAD_DELAY, 3L);
        c2.update(p2);

        final StartupHandler handler = new StartupHandler() {

            @Override
            public void waitWithStartup(boolean flag) {
            }
View Full Code Here

Examples of org.apache.sling.launchpad.api.StartupHandler

     * If all services are available, register listener and pass resources
     * to the OSGi installer.
     */
    public synchronized void notifyChange() {
        // check if all services are available
        final StartupHandler handler = (StartupHandler)this.startupListener.getService();
        if ( handler != null && this.settingsReg == null ) {
            this.activate(handler);
        }
    }
View Full Code Here

Examples of org.apache.sling.launchpad.api.StartupHandler

        BundleContext context = Mockito.mock(BundleContext.class);
        Mockito.when(context.getDataFile(SLING_ID_FILE_NAME))
                .thenReturn(slingIdFile);
        Mockito.when(context.getDataFile(OPTIONS_FILE_NAME))
                .thenReturn(optionsFile);
        StartupHandler handler = Mockito.mock(StartupHandler.class);
        // write options
        List<SlingSettingsServiceImpl.Options> options = new ArrayList<SlingSettingsServiceImpl.Options>();
        FileOutputStream fos = null;
        ObjectOutputStream oos = null;
        try {
View Full Code Here

Examples of org.apache.sling.launchpad.api.StartupHandler

     */
    public synchronized void notifyChange() {
        // check if all services are available
        final OsgiInstaller installer = (OsgiInstaller)this.installerListener.getService();
        final LaunchpadContentProvider lcp = (LaunchpadContentProvider)this.providerListener.getService();
        final StartupHandler handler = (StartupHandler)this.startupListener.getService();
        final SlingSettingsService settings = (SlingSettingsService)this.settingsListener.getService();
        if ( installer != null && lcp != null && handler != null && settings != null ) {
            if ( !this.installed ) {
                this.installed = true;
                this.launchpadListener = new LaunchpadListener(handler);
View Full Code Here

Examples of org.cfeclipse.cfml.images.StartupHandler

      DictionaryManager.initDictionaries();

      // startup the image hovers lazily so plugin starts fast
      Job job = new WorkspaceJob("Initializing Image Hovers") {
        public IStatus runInWorkspace(IProgressMonitor monitor) {
          StartupHandler startupHandler = new StartupHandler();
          startupHandler.earlyStartup();
          if (monitor.isCanceled()) return Status.CANCEL_STATUS;
          return Status.OK_STATUS;
        }
      };
      job.schedule(3000);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.