Package railo.runtime.config

Examples of railo.runtime.config.ConfigServerImpl


        }catch (Exception e) {}
        store();
    }
   
    private void doListAuthKey() throws PageException {
      ConfigServerImpl cs=(ConfigServerImpl) config;
      pageContext.setVariable(
                 getString("admin",action,"returnVariable"),
                 Caster.toArray(cs.getAuthenticationKeys()));
    }
View Full Code Here


     * @throws PageException
     */
    private void doGetContexts() throws PageException {
      CFMLFactory[] factories;
      if(config instanceof ConfigServerImpl) {
        ConfigServerImpl cs=(ConfigServerImpl) config;
        factories = cs.getJSPFactories();
      }
      else {
          ConfigWebImpl cw=(ConfigWebImpl) config;
        factories = new CFMLFactory[]{cw.getFactory()};
      }
View Full Code Here

    private void doUpdateContext() throws PageException, IOException {
      String strSrc = getString("admin",action,"source");
      String strRealpath = getString("admin",action,"destination");
        Resource src = ResourceUtil.toResourceExisting(pageContext, strSrc);
       
        ConfigServerImpl server = (ConfigServerImpl) config.getConfigServer(password);
        Resource trg,p;
        Resource deploy = server.getConfigDir().getRealResource("web-context-deployment");
        deploy.mkdirs();
       
        // deploy it
        trg=deploy.getRealResource(strRealpath);
      if(trg.exists()) trg.remove(true);
      p = trg.getParentResource();
        if(!p.isDirectory())p.createDirectory(true);
        src.copyTo(trg, false);
        store();
       
        ConfigWeb[] webs = server.getConfigWebs();
        for(int i=0;i<webs.length;i++){
          ConfigWebFactory.deployWebContext(server,webs[i], true);
        }
       
    }
View Full Code Here

    }
   
   
    private void doRemoveContext() throws PageException, IOException {
      String strRealpath = getString("admin",action,"destination");
      ConfigServerImpl server = (ConfigServerImpl) config;
       
      try {
        admin.removeContext(server, true,strRealpath);
    }
    catch (SAXException e) {
View Full Code Here

  private void doGetMonitors() throws PageException  {
    if(!(config instanceof ConfigServerImpl))
      throw new ApplicationException("invalid context for this action");
   
    ConfigServerImpl cs=(ConfigServerImpl) config;
    IntervallMonitor[] intervalls = cs.getIntervallMonitors();
    RequestMonitor[] requests = cs.getRequestMonitors();
   
    railo.runtime.type.Query qry=
      new QueryImpl(new Collection.Key[]{KeyConstants._name,KeyConstants._type,LOG_ENABLED,CLASS}, 0, "monitors");
    doGetMonitors(qry,intervalls);
    doGetMonitors(qry,requests);
View Full Code Here

        pageContext.setVariable(getString("admin",action,"returnVariable"),qry);
  }
  private void doGetMonitor() throws PageException  {
    if(!(config instanceof ConfigServerImpl))
      throw new ApplicationException("invalid context for this action");
    ConfigServerImpl cs=(ConfigServerImpl) config;

    String type=getString("admin",action,"monitorType");
    String name=getString("admin",action,"name");
    type=type.trim();
    Monitor m;
    if("request".equalsIgnoreCase(type))
      m=cs.getRequestMonitor(name);
    else
      m=cs.getIntervallMonitor(name);
   
    Struct sct=new StructImpl();
    sct.setEL(KeyConstants._name, m.getName());
    sct.setEL(KeyConstants._type, m.getType()==Monitor.TYPE_INTERVALL?"intervall":"request");
    sct.setEL(LOG_ENABLED, m.isLogEnabled());
View Full Code Here

        sct.set("usetimeserver",config.getUseTimeServer());
    // replaced with encoding outputsct.set("defaultencoding", config.get DefaultEncoding());
    }
    private void doIsMonitorEnabled() throws PageException  {
        if(config instanceof ConfigServerImpl) {
          ConfigServerImpl cs=(ConfigServerImpl) config;
          pageContext.setVariable(getString("admin",action,"returnVariable"),Caster.toBoolean(cs.isMonitoringEnabled()));
        }
    }
View Full Code Here

    //private static CFMLEngineImpl engine=new CFMLEngineImpl();

    private CFMLEngineImpl(CFMLEngineFactory factory) {
      this.factory=factory;
      CFMLEngineFactory.registerInstance(this);// patch, not really good but it works
        ConfigServerImpl cs = getConfigServerImpl();
     
        SystemOut.printDate(SystemUtil.getPrintWriter(SystemUtil.OUT),"Start CFML Controller");
        Controler controler = new Controler(cs,initContextes,5*1000,controlerState);
        controler.setDaemon(true);
        controler.setPriority(Thread.MIN_PRIORITY);
View Full Code Here

   
    @Override
   
    public CFMLFactory getCFMLFactory(ServletContext srvContext, ServletConfig srvConfig,HttpServletRequest req) throws ServletException {
      String real=ReqRspUtil.getRootPath(srvContext);
        ConfigServerImpl cs = getConfigServerImpl();
     
       
        // Load JspFactory
        CFMLFactoryImpl factory=null;
        Object o=contextes.get(real);
View Full Code Here

TOP

Related Classes of railo.runtime.config.ConfigServerImpl

Copyright © 2018 www.massapicom. 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.