Package org.rzo.yajsw.script

Examples of org.rzo.yajsw.script.Script.execute()


        _cluster = clazz.newInstance();
        _clusterListener = new ClusterNodeChangeListener()
        {
          public void nodeChanged()
          {
            script.execute();
          }
        };
        Method m = clazz.getMethod("addNodeChangeListener", ClusterNodeChangeListener.class);
        m.invoke(_cluster, _clusterListener);
      }
View Full Code Here


  private long getRestartDelay()
  {
    Script script = getRestartDelayScript();
    if (script != null)
    {
      Object time = script.execute();
      if (time instanceof Number)
        return ((Number) time).longValue() * 1000;
    }
    return _config.getLong("wrapper.restart.delay", DEFAULT_RESTART_DELAY) * 1000;
  }
 
View Full Code Here

        Logger logger = new MyLogger();
        logger.addHandler(new ConsoleHandler());
        System.out.println("wrapped process: executing pre script " + preScript);
        Script script = ScriptFactory.createScript(preScript, "", null, new String[0], null, 0);
        if (script != null)
          script.execute();
        else
          System.out.println("wrapped process: executing pre script error: could not open script");
      }
      catch (Throwable ex)
      {
View Full Code Here

  {
    if (shutdownScript != null & !"".equals(shutdownScript))
    {
      Script script = ScriptFactory.createScript(shutdownScript, "", null, new String[0], null, 0);
      if (script != null)
        script.execute();
    }

  }

  public void executeScript(String scriptFileName, ClassLoader wrapperClassLoader)
View Full Code Here

    Thread.currentThread().setContextClassLoader(wrapperClassLoader);
    try
    {
      Script script = ScriptFactory.createScript(scriptFileName, "", null, (String[]) getMainMethodArgs(), null, 0);
      if (script != null)
        script.execute();
      else
        System.err.println("error opening script script: " + scriptFileName);
    }
    catch (Throwable ex)
    {
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.