Package com.sun.grizzly

Examples of com.sun.grizzly.DefaultProtocolChain


                    {
                        throw new RuntimeException(ex);
                    }
                   
                   
                    pc = new DefaultProtocolChain();
                    ReadFilter readFilter = new JettyReadFilter(parser);
                    pc.addFilter(readFilter);
                   
                    HttpProtocolFilter httpProtocolFilter
                            = new HttpProtocolFilter();
View Full Code Here


        /*
         * Modify the filter chain to add a filter which blocks
         * new SIP requests.
         */
        DefaultProtocolChain protocolChain = new DefaultProtocolChain();

        if (serverHandler.protocol() == Controller.Protocol.TLS) {
            SSLReadFilter sslfilter = getSSLReadFilter(sipBindingCtx);

            protocolChain.addFilter(sslfilter);

            protocolChain.addFilter(new MessageProcessorFilter(this,
                    requestTimeOut, true, _bbPool, tlsAsyncWriteCallbackHandler));
        } else {
            protocolChain.setContinuousExecution(false);

            ReadFilter readFilter = new SharedReadFilter();

            readFilter.setContinuousExecution(false);

            protocolChain.addFilter(readFilter);

            protocolChain.addFilter(new MessageProcessorFilter(this,
                    requestTimeOut, true, _bbPool,
                    tcpUdpAsyncWriteCallbackHandler));
        }

        ProtocolChainInstanceHandler instanceHandler =
View Full Code Here

            serverControllerStarted = false;
        }
    }

    private ProtocolChain getProtocolChain() {
        DefaultProtocolChain protocolChain = new DefaultProtocolChain();

        protocolChain.setContinuousExecution(false);

        ReadFilter readFilter = new SharedReadFilter();

        readFilter.setContinuousExecution(false);

        protocolChain.addFilter(readFilter);

        protocolChain.addFilter(createMessageProcessorFilter(false,
                tcpUdpAsyncWriteCallbackHandler));

        return protocolChain;
    }
View Full Code Here

        SSLReadFilter sslReadFilter = getSSLReadFilter(sipBindingCtx);

        //Carefull dynamic reconfig update of SSL relies on the sslReadFilter

        //to be the first filter in the chain.
        ProtocolChain tlsProtocolChain = new DefaultProtocolChain();

        tlsProtocolChain.addFilter(sslReadFilter);

        tlsProtocolChain.addFilter(createMessageProcessorFilter(false,
                tlsAsyncWriteCallbackHandler));

        return tlsProtocolChain;
    }
View Full Code Here

        return tlsProtocolChain;
    }

    private ProtocolChain getUDPProtocolChain(SipBindingCtx sipBindingCtx) {
        DefaultProtocolChain udpProtocolChain = new DefaultProtocolChain();

        udpProtocolChain.setContinuousExecution(false);

        udpProtocolChain.addFilter(createMessageProcessorFilter(false,
                tcpUdpAsyncWriteCallbackHandler));

        return udpProtocolChain;
    }
View Full Code Here

         * Does this machine have multiple IP addresses, if no then
         * we cannot suppor certain types of STUN requests
         */

        StunServerImpl serverImpl = new StunServerImpl(null);
        DefaultProtocolChain protocolChain = new DefaultProtocolChain();
        protocolChain.setContinuousExecution(false);
        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);
View Full Code Here

                    {
                        throw new RuntimeException(ex);
                    }
                   
                   
                    pc = new DefaultProtocolChain();
                    ReadFilter readFilter = new JettyReadFilter(parser);
                    pc.addFilter(readFilter);
                   
                    HttpProtocolFilter httpProtocolFilter
                            = new HttpProtocolFilter();
View Full Code Here

TOP

Related Classes of com.sun.grizzly.DefaultProtocolChain

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.