Package com.sun.enterprise.web.connector.grizzly

Examples of com.sun.enterprise.web.connector.grizzly.Pipeline


        }
            
        String token = getContextRoot();
       
        // Lazy instanciation
        Pipeline pipeline = pipelines.get(token);
        if (pipeline == null){
            pipeline = applyRule(token);
            pipelines.put(token,pipeline);
        }
               
View Full Code Here


   
    /**
     * Apply the thread ratio.
     */
    protected Pipeline applyRule(String token){ 
        Pipeline p = readTask.getPipeline();
        int maxThreads = p.getMaxThreads();
       
        Double threadRatio = privilegedTokens.get(token);
        boolean defaultPipeline = false;
        Pipeline pipeline = null;
        if (threadRatio == null) {
            // Try to lookup the default Pipeline
            pipeline = pipelines.get("*");
            if (pipeline != null){
                return pipeline;
View Full Code Here

    protected Pipeline newPipeline(int threadCount,Pipeline p){
        // Run the Task on the SelectorThread
        if ( threadCount == 0){
            return null;
        }
        Pipeline pipeline = new LinkedListPipeline();
        pipeline.setMinThreads(threadCount);
        pipeline.setMaxThreads(threadCount);
        pipeline.setName("httpWorkerThread-" + readTask.getSelectorThread().getPort());
        pipeline.setQueueSizeInBytes(
                readTask.getSelectorThread().getQueueSizeInBytes());
        pipeline.initPipeline();  
        pipeline.startPipeline();
        return pipeline;
    }
View Full Code Here

       
        String token = getContextRoot();
        Long memoryAllowedSize = memoryAllowed.get(token);
        Double allowedRatio = privilegedTokens.get(token);
       
        Pipeline pipeline = pipelines.get(token);
        synchronized(lock){
            if ( pipeline == null ){           
                if ( defaultPipeline == null) {
                    defaultPipeline = newPipeline(readTask.getPipeline()
                        .getMaxThreads(),readTask.getPipeline());
View Full Code Here

    /**
     * Instanciate a class based on a property.
     */
    private Object loadInstance(String property){       
        Class className = null;                              
        Pipeline pipeline = null;                              
        try{                             
            className = Class.forName(property);
            return className.newInstance();
        } catch (ClassNotFoundException ex){
        } catch (InstantiationException ex){
View Full Code Here

                                   String name,
                                   int port,
                                   int priority){
       
        Class className = null;                              
        Pipeline pipeline = null;                              
        try{                             
            className = Class.forName(getPipelineClassName());
            pipeline = (Pipeline)className.newInstance();
        } catch (ClassNotFoundException ex){
            getLogger().log(Level.WARNING,
                       "Unable to load Pipeline: " + getPipelineClassName());
            pipeline = new SSLPipeline();
        } catch (InstantiationException ex){
            getLogger().log(Level.WARNING,
                       "Unable to instantiate Pipeline: "
                       + getPipelineClassName());
            pipeline = new SSLPipeline();
        } catch (IllegalAccessException ex){
            getLogger().log(Level.WARNING,
                       "Unable to instantiate Pipeline: "
                       + getPipelineClassName());
            pipeline = new SSLPipeline();
        }
       
        if (getLogger().isLoggable(Level.FINE)){
            getLogger().log(Level.FINE,
                       "http-listener " + port + " uses pipeline: "
                       + pipeline.getClass().getName());
        }
       
        pipeline.setMaxThreads(maxThreads);
        pipeline.setMinThreads(minThreads);   
        pipeline.setName(name);
        pipeline.setPort(port);
        pipeline.setPriority(priority);
        pipeline.setQueueSizeInBytes(getMaxQueueSizeInBytes());
        pipeline.setThreadsIncrement(getThreadsIncrement());
        pipeline.setThreadsTimeout(getThreadsTimeout());
       
        return pipeline;
   
    }
View Full Code Here

        }
            
        String token = getContextRoot();
       
        // Lazy instanciation
        Pipeline pipeline = pipelines.get(token);
        if (pipeline == null){
            pipeline = applyRule(token);
            pipelines.put(token,pipeline);
        }
               
View Full Code Here

   
    /**
     * Apply the thread ratio.
     */
    protected Pipeline applyRule(String token){ 
        Pipeline p = readTask.getPipeline();
        int maxThreads = p.getMaxThreads();
       
        Double threadRatio = privilegedTokens.get(token);
        boolean defaultPipeline = false;
        Pipeline pipeline = null;
        if (threadRatio == null) {
            // Try to lookup the default Pipeline
            pipeline = pipelines.get("*");
            if (pipeline != null){
                return pipeline;
View Full Code Here

    protected Pipeline newPipeline(int threadCount,Pipeline p){
        // Run the Task on the SelectorThread
        if ( threadCount == 0){
            return null;
        }
        Pipeline pipeline = new LinkedListPipeline();
        pipeline.setMinThreads(threadCount);
        pipeline.setMaxThreads(threadCount);
        pipeline.setName("httpWorkerThread-" + readTask.getSelectorThread().getPort());
        pipeline.setQueueSizeInBytes(
                readTask.getSelectorThread().getQueueSizeInBytes());
        pipeline.initPipeline();  
        pipeline.startPipeline();
        return pipeline;
    }
View Full Code Here

       
        String token = getContextRoot();
        Long memoryAllowedSize = memoryAllowed.get(token);
        Double allowedRatio = privilegedTokens.get(token);
       
        Pipeline pipeline = pipelines.get(token);
        synchronized(lock){
            if ( pipeline == null ){           
                if ( defaultPipeline == null) {
                    defaultPipeline = newPipeline(readTask.getPipeline()
                        .getMaxThreads(),readTask.getPipeline());
View Full Code Here

TOP

Related Classes of com.sun.enterprise.web.connector.grizzly.Pipeline

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.