Package com.sun.grizzly

Examples of com.sun.grizzly.ProtocolChainInstanceHandler


            ctxs.put(ctx, pair);
            registerForMonitoring(sipBindingCtx.getId(), sipBindingCtx.getTargetTuples()[0]);
            if (sipBindingCtx.isEnabled()) {
                final ProtocolChain protocolChain = getProtocolChain();

                ProtocolChainInstanceHandler instanceHandler =
                        new SimpleProtocolChainInstanceHandler(protocolChain);

                serverController.setPipeline(serverPipeline);

                clientController.setPipeline(clientPipeline);
View Full Code Here


                    }

                    final ProtocolChain udpProtocolChain =
                            getUDPProtocolChain(sipBindingCtx);

                    ProtocolChainInstanceHandler udpInstanceHandler =
                            new SimpleProtocolChainInstanceHandler(udpProtocolChain);

                    selHdlPair.setLeft(startUDPServer(targetTuple,
                            udpInstanceHandler));

                    selHdlPair.setRight(startUDPClient(udpInstanceHandler));
                } else {
                    selHdlPair.setLeft(startUDPServer(targetTuple,
                            instanceHandler));

                    selHdlPair.setRight(startUDPClient(instanceHandler));
                }

                break;
            }

            case SipTransports.TCP: {
                selHdlPair.setLeft(startTCPServer(targetTuple, instanceHandler));

                selHdlPair.setRight(startTCPClient(instanceHandler));

                break;
            }

            case SipTransports.TLS: {
                final ProtocolChain tlsProtocolChain =
                        getTLSProtocolChain(sipBindingCtx);

                ProtocolChainInstanceHandler tlsInstanceHandler =
                        new SimpleProtocolChainInstanceHandler(tlsProtocolChain);

                selHdlPair.setLeft(startTLSServer(targetTuple,
                        tlsInstanceHandler));
View Full Code Here

                    });
                }

                final ProtocolChain udpProtocolChain = getProtocolChain();

                ProtocolChainInstanceHandler instanceHandler =
                        new SimpleProtocolChainInstanceHandler(udpProtocolChain);

                Pair<SelectorHandler, SelectorHandler> selHdlPair =
                        new Pair<SelectorHandler, SelectorHandler>();
View Full Code Here

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

        ProtocolChainInstanceHandler instanceHandler =
                new SimpleProtocolChainInstanceHandler(protocolChain);

        serverHandler.setProtocolChainInstanceHandler(instanceHandler);

        /*
 
View Full Code Here

                        //Add
                        final ProtocolChain udpProtocolChain =
                                getProtocolChain();

                        ProtocolChainInstanceHandler instanceHandler =
                                new SimpleProtocolChainInstanceHandler(udpProtocolChain);

                        startSelectorHandlers(newTT, selHdlPair,
                                instanceHandler, sipBindingCtx);
                    }

                    oldTTs.remove(oldTT);
                } else {
                //okidoki

                //Check updateSSL, there the SSL changes are taken into

                //account.
                }
            } else {
                //Add it
                if (logger.isLoggable(Level.FINE)) {
                    logger.log(Level.FINE, "sip.network.grizzly.update.tt",
                            new Object[]{
                        newTT.getProtocol().name(),
                        sipBindingCtx.getContext()
                    });
                }

                final ProtocolChain udpProtocolChain = getProtocolChain();

                ProtocolChainInstanceHandler instanceHandler =
                        new SimpleProtocolChainInstanceHandler(udpProtocolChain);

                Pair<SelectorHandler, SelectorHandler> selHdlPair =
                        new Pair<SelectorHandler, SelectorHandler>();
                startSelectorHandlers(newTT, selHdlPair, instanceHandler,
View Full Code Here

            ue.printStackTrace();
        }
        stunHandler.setReuseAddress(true);
        stunHandler.setLogger(logger);

        ProtocolChainInstanceHandler instanceHandler =
                new SimpleProtocolChainInstanceHandler(protocolChain);

        stunController.setProtocolChainInstanceHandler(instanceHandler);
        stunController.addSelectorHandler(stunHandler);
        stunController.setPipeline(stunPipeline);
View Full Code Here

        if (getEmbeddedHttp().getAsyncHandler() == null) {
            AsyncHandler asyncHandler = new DefaultAsyncHandler();
            getEmbeddedHttp().setAsyncHandler(asyncHandler);
        }
        getEmbeddedHttp().getAsyncHandler().addAsyncFilter(cometFilter);
        final ProtocolChainInstanceHandler pcih =
                getEmbeddedHttp().getController().getProtocolChainInstanceHandler();
        if (!(pcih instanceof NonCachingInstanceHandler)) {
            ProtocolChainInstanceHandler nonCaching =
                new NonCachingInstanceHandler(pcih);
            getEmbeddedHttp().getController().setProtocolChainInstanceHandler(nonCaching);
        }
        getEmbeddedHttp().setEnableAsyncExecution(true);
    }
View Full Code Here

        getEmbeddedHttp().setEnableAsyncExecution(true);
    }

    private void disableComet() {
        getEmbeddedHttp().setAsyncHandler(null);
        final ProtocolChainInstanceHandler pcih =
                getEmbeddedHttp().getController().getProtocolChainInstanceHandler();
        if (!(pcih instanceof NonCachingInstanceHandler)) {
            ProtocolChainInstanceHandler nonCaching =
                new NonCachingInstanceHandler(pcih);
            getEmbeddedHttp().getController().setProtocolChainInstanceHandler(nonCaching);
        }
        getEmbeddedHttp().setEnableAsyncExecution(false);
    }
View Full Code Here

TOP

Related Classes of com.sun.grizzly.ProtocolChainInstanceHandler

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.