Package com.sun.grizzly.config.dom

Examples of com.sun.grizzly.config.dom.Protocols


            return ps.findProtocol(protocolName);
        }

        private void deleteProtocol(
                    final String protocolName) throws TransactionFailure {
                final Protocols ps_w = writableProtocols();
                if (ps_w == null) {
                    return;
                }
                final Protocol doomedProtocol = ps_w.findProtocol(protocolName);
                if (doomedProtocol != null) {
                    ps_w.getProtocol().remove(doomedProtocol);
                }
            }
View Full Code Here


            NetworkListeners networkListeners = networkConfig.getNetworkListeners();
            final NetworkListener listenerToBeRemoved =
                    networkConfig.getNetworkListener(name);

            final Protocols protocols = networkConfig.getProtocols();
            final Protocol protocol = networkConfig.findProtocol(name);

            if (listenerToBeRemoved == null) {
                log.severe("Network Listener " + name + " doesn't exist");
            } else {
                final com.sun.enterprise.config.serverbeans.VirtualServer virtualServer =
                        httpService.getVirtualServerByName(
                        listenerToBeRemoved.findHttpProtocol().getHttp().getDefaultVirtualServer());
                ConfigSupport.apply(new ConfigCode() {
                    public Object run(ConfigBeanProxy... params) throws PropertyVetoException {
                        final NetworkListeners listeners = (NetworkListeners) params[0];
                        final com.sun.enterprise.config.serverbeans.VirtualServer server =
                                (com.sun.enterprise.config.serverbeans.VirtualServer) params[1];
                        listeners.getNetworkListener().remove(listenerToBeRemoved);
                        server.removeNetworkListener(listenerToBeRemoved.getName());
                        return listenerToBeRemoved;
                    }
                }, networkListeners, virtualServer);

                ConfigSupport.apply(new ConfigCode() {
                    public Object run(ConfigBeanProxy... params) throws PropertyVetoException {
                        final Protocols protocols = (Protocols) params[0];
                        final Protocol protocol = (Protocol) params[1];
                        protocols.getProtocol().remove(protocol);
                        return protocol;
                    }
                }, protocols, protocol);

            }
View Full Code Here

            NetworkListeners networkListeners = networkConfig.getNetworkListeners();
            final NetworkListener listenerToBeRemoved =
                    networkConfig.getNetworkListener(name);

            final Protocols protocols = networkConfig.getProtocols();
            final Protocol protocol = networkConfig.findProtocol(name);

            if (listenerToBeRemoved == null) {
                log.severe("Network Listener " + name + " doesn't exist");
            } else {
                final com.sun.enterprise.config.serverbeans.VirtualServer virtualServer =
                        httpService.getVirtualServerByName(
                        listenerToBeRemoved.findHttpProtocol().getHttp().getDefaultVirtualServer());
                ConfigSupport.apply(new ConfigCode() {
                    public Object run(ConfigBeanProxy... params) throws PropertyVetoException {
                        final NetworkListeners listeners = (NetworkListeners) params[0];
                        final com.sun.enterprise.config.serverbeans.VirtualServer server =
                                (com.sun.enterprise.config.serverbeans.VirtualServer) params[1];
                        listeners.getNetworkListener().remove(listenerToBeRemoved);
                        server.removeNetworkListener(listenerToBeRemoved.getName());
                        return listenerToBeRemoved;
                    }
                }, networkListeners, virtualServer);

                ConfigSupport.apply(new ConfigCode() {
                    public Object run(ConfigBeanProxy... params) throws PropertyVetoException {
                        final Protocols protocols = (Protocols) params[0];
                        final Protocol protocol = (Protocol) params[1];
                        protocols.getProtocol().remove(protocol);
                        return protocol;
                    }
                }, protocols, protocol);

            }
View Full Code Here

            if (protocols_w == null) {
                final NetworkConfig nc = config_w.getNetworkConfig();
                if (nc == null) {
                    return null;
                }
                final Protocols p = nc.getProtocols();
                protocols_w = t.enroll(p);
            }
            return protocols_w;
        }
View Full Code Here

                /*
                 * Try to find an existing entry for this protocol.
                 */
                final Protocol p_r = findProtocol(protocolName);
                if (p_r == null) {
                    final Protocols ps_w = writableProtocols();
                    if (ps_w == null) {
                        return null;
                    }
                    p_w = ps_w.createChild(Protocol.class);
                    p_w.setName(protocolName);
                    ps_w.getProtocol().add(p_w);
                } else {
                    p_w = t.enroll(p_r);
                }
                namedProtocols_w.put(protocolName, p_w);
            }
View Full Code Here

        private Protocol findProtocol(final String protocolName) {
            final NetworkConfig nc = config_w.getNetworkConfig();
            if (nc == null) {
                return null;
            }
            final Protocols ps = nc.getProtocols();
            if (ps == null) {
                return null;
            }
            return ps.findProtocol(protocolName);
        }
View Full Code Here

            return ps.findProtocol(protocolName);
        }

        private void deleteProtocol(
                    final String protocolName) throws TransactionFailure {
                final Protocols ps_w = writableProtocols();
                if (ps_w == null) {
                    return;
                }
                final Protocol doomedProtocol = ps_w.findProtocol(protocolName);
                if (doomedProtocol != null) {
                    ps_w.getProtocol().remove(doomedProtocol);
                }
            }
View Full Code Here

        if (newConfig!=null) {
            config = newConfig;
        }
        report = context.getActionReport();
        try {
            final Protocols protocols = config.getNetworkConfig().getProtocols();
            final Protocol protocol = protocols.findProtocol(protocolName);
            validate(protocol, "create.http.fail.protocolnotfound",
                "The specified protocol {0} is not yet configured", protocolName);
            ProtocolChainInstanceHandler handler = getHandler(protocol);
            ProtocolChain chain = getChain(handler);
            ConfigSupport.apply(new SingleConfigCode<ProtocolChain>() {
View Full Code Here

            config = newConfig;
        }
        Protocol protocolToBeRemoved = null;
        ActionReport report = context.getActionReport();
        NetworkConfig networkConfig = config.getNetworkConfig();
        Protocols protocols = networkConfig.getProtocols();
        try {
            for (Protocol protocol : protocols.getProtocol()) {
                if (protocolName.equalsIgnoreCase(protocol.getName())) {
                    protocolToBeRemoved = protocol;
                }
            }
            if (protocolToBeRemoved == null) {
View Full Code Here

        if (newConfig!=null) {
            config = newConfig;
        }
        report = context.getActionReport();
        try {
            final Protocols protocols = config.getNetworkConfig().getProtocols();
            final Protocol protocol = protocols.findProtocol(protocolName);
            validate(protocol, "create.http.fail.protocolnotfound",
                "The specified protocol {0} is not yet configured", protocolName);
            final Class<?> filterClass = Thread.currentThread().getContextClassLoader().loadClass(classname);
            if (!com.sun.grizzly.ProtocolFilter.class.isAssignableFrom(filterClass)) {
                report.setMessage(localStrings.getLocalString("create.portunif.fail.notfilter",
View Full Code Here

TOP

Related Classes of com.sun.grizzly.config.dom.Protocols

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.