Package com.sun.grizzly

Examples of com.sun.grizzly.DefaultPipeline


                return protocolChains.offer(pc);
            }
        };
       
        controller.setProtocolChainInstanceHandler(instanceHandler);
        Pipeline pipeline = new DefaultPipeline();

        if(getServer().getThreadPool() instanceof BoundedThreadPool)
            pipeline.setMaxThreads(((BoundedThreadPool)getServer().getThreadPool()).getMaxThreads());
        else if (getServer().getThreadPool() instanceof QueuedThreadPool)
            pipeline.setMaxThreads(((QueuedThreadPool)getServer().getThreadPool()).getMaxThreads());
        controller.setPipeline(pipeline);
    }
View Full Code Here


        }
    }

    private DefaultPipeline createPipeline(String pipelineName,
            int distinctionPort) {
        DefaultPipeline pipeline = new DefaultPipeline(maxPipelineThreads,
                minPipelineThreads, pipelineName, distinctionPort);

        pipeline.setThreadsIncrement(pipelineThreadsIncrement);

        pipeline.setInitialByteBufferSize(pipelineInitialByteBufferSize);

        pipeline.setByteBufferType(ByteBufferType.HEAP);

        // No limits for now.
        pipeline.setMaxQueueSize(queueSize);

        return pipeline;
    }
View Full Code Here

        ReadFilter readFilter = new ReadFilter();
        readFilter.setContinuousExecution(false);
        protocolChain.addFilter(readFilter);
        protocolChain.addFilter(new StunMessageFilter(serverImpl));

        stunPipeline = new DefaultPipeline(10,
                2, "stun-pipeline", DEFAULT_STUN_PORT);
        stunPipeline.setThreadsIncrement(1);
        ((DefaultPipeline) stunPipeline).setInitialByteBufferSize(4096);
        ((DefaultPipeline) stunPipeline).setByteBufferType(ByteBufferType.HEAP);
        stunPipeline.setMaxQueueSize(-1);
View Full Code Here

                return protocolChains.offer(pc);
            }
        };
       
        controller.setProtocolChainInstanceHandler(instanceHandler);
        Pipeline pipeline = new DefaultPipeline();
        pipeline.setMaxThreads(
                ((BoundedThreadPool)getServer().getThreadPool()).getMaxThreads());
        controller.setPipeline(pipeline);
    }
View Full Code Here

TOP

Related Classes of com.sun.grizzly.DefaultPipeline

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.