Package org.apache.catalina

Examples of org.apache.catalina.Executor


            }
        }
        ObjectRecipe recipe = new ObjectRecipe(className, properties);
        recipe.allow(Option.IGNORE_MISSING_PROPERTIES);
        recipe.allow(Option.NAMED_PARAMETERS);
        Executor executor = (Executor) recipe.create(cl);
        return executor;
    }
View Full Code Here


        }
        ObjectRecipe recipe = new ObjectRecipe(className, properties);
        recipe.allow(Option.IGNORE_MISSING_PROPERTIES);
        Service service = (Service) recipe.create(cl);
        for (ExecutorType executorType: getExecutor()) {
            Executor executor = executorType.getExecutor(cl, kernel);
            service.addExecutor(executor);
            TomcatServerGBean.executors.put(executor.getName(), executor);
        }
        for (ConnectorType connectorType: getConnector()) {
            Connector connector = connectorType.getConnector(cl, service);
            service.addConnector(connector);
        }
View Full Code Here

        Connector connector = (Connector) recipe.create(cl);
        boolean executorSupported = !connector.getProtocolHandlerClassName().equals("org.apache.jk.server.JkCoyoteHandler");
        for (Map.Entry<QName, String> entry : otherAttributes.entrySet()) {
            String name = entry.getKey().getLocalPart();
            if (executorSupported && "executor".equals(name)) {
                Executor executor = service.getExecutor(entry.getValue());
                if (executor == null) {
                    throw new IllegalArgumentException("No executor found in service with name: " + entry.getValue());
                }
                IntrospectionUtils.callMethod1(connector.getProtocolHandler(),
                        "setExecutor",
View Full Code Here

        boolean executorSupported = !connector.getProtocolHandlerClassName().equals("org.apache.jk.server.JkCoyoteHandler");
        for (Map.Entry<QName, String> entry : otherAttributes.entrySet()) {
            String name = entry.getKey().getLocalPart();
            String value = entry.getValue();
            if (executorSupported && "executor".equals(name)) {
                Executor executor = service.getExecutor(entry.getValue());
                if (executor == null) {
                    throw new IllegalArgumentException("No executor found in service with name: " + value);
                }
                IntrospectionUtils.callMethod1(connector.getProtocolHandler(),
                        "setExecutor",
View Full Code Here

     */
    @Override
    public void begin(String namespace, String name, Attributes attributes)
            throws Exception {
        Service svc = (Service)digester.peek();
        Executor ex = null;
        if ( attributes.getValue("executor")!=null ) {
            ex = svc.getExecutor(attributes.getValue("executor"));
        }
        Connector con = new Connector(attributes.getValue("protocol"));
        if ( ex != null _setExecutor(con,ex);
View Full Code Here

            throw new MBeanException(e);
        } catch (InvalidTargetObjectTypeException e) {
            throw new MBeanException(e);
        }

        Executor executor;
        try {
             executor = (Executor)Class.forName(type).newInstance();
        } catch (InstantiationException e) {
            throw new MBeanException(e);
        } catch (IllegalAccessException e) {
View Full Code Here

            throw new MBeanException(e);
        } catch (InvalidTargetObjectTypeException e) {
            throw new MBeanException(e);
        }

        Executor executor = service.getExecutor(name);
        return executor.toString();

    }
View Full Code Here

      return contentType.indexOf('\n') + contentType.indexOf('\r') > -2;
   }
  
   static private void createAndSetExecutor(ProtocolHandler protocolHandler, String executorConfig)
   {
      Executor executor = new StandardThreadExecutor();
      log.debug("setting executor to " + executor + " with properties:");
      if (executorConfig != null)
      {
         String[] ss = executorConfig.split(",");
         for (int i = 0; i < ss.length; i++)
         {
            int pos = ss[i].indexOf('=');
            setProperty(executor, ss[i].substring(0, pos).trim(), ss[i].substring(pos + 1).trim());
            log.debug(ss[i].substring(0, pos).trim() + ": " + ss[i].substring(pos + 1).trim());
        
      }
     
      try
      {
         executor.start();
      }
      catch (LifecycleException e)
      {
         log.warn("unable to start executor " + executor, e);
         return;
View Full Code Here

     *
     * @param attributes The attribute list of this element
     */
    public void begin(Attributes attributes) throws Exception {
        Service svc = (Service)digester.peek();
        Executor ex = null;
        if ( attributes.getValue("executor")!=null ) {
            ex = svc.getExecutor(attributes.getValue("executor"));
        }
        Connector con = new Connector(attributes.getValue("protocol"));
        if ( ex != null _setExecutor(con,ex);
View Full Code Here

            throw new MBeanException(e);
        } catch (InvalidTargetObjectTypeException e) {
            throw new MBeanException(e);
        }
       
        Executor executor;
        try {
             executor = (Executor)Class.forName(type).newInstance();
        } catch (InstantiationException e) {
            throw new MBeanException(e);
        } catch (IllegalAccessException e) {
View Full Code Here

TOP

Related Classes of org.apache.catalina.Executor

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.