Package org.apache.geronimo.management.geronimo

Examples of org.apache.geronimo.management.geronimo.SecureConnector


                String algorithm = actionRequest.getParameter("algorithm");
                String truststoreType = actionRequest.getParameter("truststoreType");
                String truststoreFile = actionRequest.getParameter("truststoreFile");
                String truststorePass = actionRequest.getParameter("truststorePassword");
                boolean clientAuth = isValid(actionRequest.getParameter("clientAuth"));
                SecureConnector secure = (SecureConnector) connector;
                if(isValid(keystoreType)) {secure.setKeystoreType(keystoreType);}
                if(isValid(keystoreFile)) {secure.setKeystoreFileName(keystoreFile);}
                if(isValid(keystorePass)) {secure.setKeystorePassword(keystorePass);}
                if(isValid(secureProtocol)) {secure.setSecureProtocol(secureProtocol);}
                if(isValid(algorithm)) {secure.setAlgorithm(algorithm);}
                secure.setClientAuthRequired(clientAuth);
                if(server.equals(WEB_SERVER_JETTY)) {
                    if(isValid(privateKeyPass)) {setProperty(secure, "keyPassword", privateKeyPass);}
                    String keyStore = actionRequest.getParameter("unlockKeyStore");
                    setProperty(secure, "keyStore", keyStore);
                    try {
                        KeystoreInstance[] keystores = PortletManager.getCurrentServer(actionRequest).getKeystoreManager().getKeystores();

                        String[] keys = null;
                        for (int i = 0; i < keystores.length; i++) {
                            KeystoreInstance keystore = keystores[i];
                            if(keystore.getKeystoreName().equals(keyStore)) {
                                keys = keystore.getUnlockedKeys(null);
                            }
                        }
                        if(keys != null && keys.length == 1) {
                            setProperty(secure, "keyAlias", keys[0]);
                        } else {
                            throw new PortletException("Cannot handle keystores with anything but 1 unlocked private key");
                        }
                    } catch (KeystoreException e) {
                        throw new PortletException(e);
                    }
                    String trustStore = actionRequest.getParameter("unlockTrustStore");
                    // "" is a valid trustStore value, which means the parameter should be cleared
                    setProperty(secure, "trustStore", isValid(trustStore) ? trustStore : null);
                } else if (server.equals(WEB_SERVER_TOMCAT)) {
                    if(isValid(truststoreType)) {setProperty(secure, "truststoreType", truststoreType);}
                    if(isValid(truststoreFile)) {setProperty(secure, "truststoreFileName", truststoreFile);}
                    if(isValid(truststorePass)) {setProperty(secure, "truststorePassword", truststorePass);}
                } else {
                    //todo:   Handle "should not occur" condition
                }
            }
            // Start the connector
            try {
                ((GeronimoManagedBean)connector).startRecursive();
            } catch (Exception e) {
                log.error("Unable to start connector", e); //todo: get into rendered page somehow?
            }
            actionResponse.setRenderParameter("mode", "list");
        } else if(mode.equals("save")) { // User just submitted the form to update a connector
            // Get submitted values
            //todo: lots of validation
            String host = actionRequest.getParameter("host");
            int port = Integer.parseInt(actionRequest.getParameter("port"));
            int maxThreads = Integer.parseInt(actionRequest.getParameter("maxThreads"));
            Integer minThreads = getInteger(actionRequest, "minThreads");
            String connectorURI = actionRequest.getParameter("connectorURI");
            // Identify and update the connector
            WebConnector connector = PortletManager.getWebConnector(actionRequest, new AbstractName(URI.create(connectorURI)));
            if(connector != null) {
                connector.setHost(host);
                connector.setPort(port);
                connector.setMaxThreads(maxThreads);
                if(server.equals(WEB_SERVER_JETTY)) {
                    if(minThreads != null) {
                        setProperty(connector,"minThreads",minThreads);
                    }
                    else if (server.equals(WEB_SERVER_TOMCAT)) {
                        //todo:   Any Tomcat specific processing?
                    }
                    else {
                        //todo:   Handle "should not occur" condition
                    }
                }
                if(connector instanceof SecureConnector) {
                    String keystoreType = actionRequest.getParameter("keystoreType");
                    String keystoreFile = actionRequest.getParameter("keystoreFile");
                    String privateKeyPass = actionRequest.getParameter("privateKeyPassword");
                    String keystorePass = actionRequest.getParameter("keystorePassword");
                    String secureProtocol = actionRequest.getParameter("secureProtocol");
                    String algorithm = actionRequest.getParameter("algorithm");
                    String truststoreType = actionRequest.getParameter("truststoreType");
                    String truststoreFile = actionRequest.getParameter("truststoreFile");
                    String truststorePass = actionRequest.getParameter("truststorePassword");
                    boolean clientAuth = isValid(actionRequest.getParameter("clientAuth"));
                    SecureConnector secure = (SecureConnector) connector;
                    if(isValid(keystoreType)) {secure.setKeystoreType(keystoreType);}
                    if(isValid(keystoreFile)) {secure.setKeystoreFileName(keystoreFile);}
                    if(isValid(keystorePass)) {secure.setKeystorePassword(keystorePass);}
                    if(isValid(secureProtocol)) {secure.setSecureProtocol(secureProtocol);}
                    if(isValid(algorithm)) {secure.setAlgorithm(algorithm);}
                    secure.setClientAuthRequired(clientAuth);
                    if(server.equals(WEB_SERVER_JETTY)) {
                        if(isValid(privateKeyPass)) {setProperty(secure, "keyPassword", privateKeyPass);}
                        String keyStore = actionRequest.getParameter("unlockKeyStore");
                        String trustStore = actionRequest.getParameter("unlockTrustStore");
                        setProperty(secure, "keyStore", keyStore);
View Full Code Here


                        //todo:   Handle "should not occur" condition
                    }
                    renderRequest.setAttribute("mode", "save");

                    if(connector instanceof SecureConnector) {
                        SecureConnector secure = (SecureConnector) connector;
                        renderRequest.setAttribute("keystoreFile",secure.getKeystoreFileName());
                        renderRequest.setAttribute("keystoreType",secure.getKeystoreType());
                        renderRequest.setAttribute("algorithm",secure.getAlgorithm());
                        renderRequest.setAttribute("secureProtocol",secure.getSecureProtocol());
                        if(secure.isClientAuthRequired()) {
                            renderRequest.setAttribute("clientAuth", Boolean.TRUE);
                        }
                        if(server.equals(WEB_SERVER_JETTY)) {
                            String keyStore = (String)getProperty(secure, "keyStore");
                            String trustStore = (String)getProperty(secure, "trustStore");
View Full Code Here

       
        AbstractNameQuery connectorQuery = new AbstractNameQuery(SecureConnector.class.getName());
        Set set = kernel.listGBeans(connectorQuery);
        for(Iterator itr = set.iterator(); itr.hasNext(); ){
            try {
                SecureConnector connector = (SecureConnector)kernel.getGBean((AbstractName)itr.next());
                if(connector.isClientAuthRequired())
                    return connector.getPort();
            } catch(Exception e) {
                e.printStackTrace();
            }
        }
        return -1;
View Full Code Here

                String algorithm = actionRequest.getParameter("algorithm");
                String truststoreType = actionRequest.getParameter("truststoreType");
                String truststoreFile = actionRequest.getParameter("truststoreFile");
                String truststorePass = actionRequest.getParameter("truststorePassword");
                boolean clientAuth = isValid(actionRequest.getParameter("clientAuth"));
                SecureConnector secure = (SecureConnector) connector;
                if(isValid(keystoreType)) {secure.setKeystoreType(keystoreType);}
                if(isValid(keystoreFile)) {secure.setKeystoreFileName(keystoreFile);}
                if(isValid(keystorePass)) {secure.setKeystorePassword(keystorePass);}
                if(isValid(secureProtocol)) {secure.setSecureProtocol(secureProtocol);}
                if(isValid(algorithm)) {secure.setAlgorithm(algorithm);}
                secure.setClientAuthRequired(clientAuth);
                if(server.equals(WEB_SERVER_JETTY)) {
                    if(isValid(privateKeyPass)) {setProperty(secure, "keyPassword", privateKeyPass);}
                    String keyStore = actionRequest.getParameter("unlockKeyStore");
                    setProperty(secure, "keyStore", keyStore);
                    try {
                        KeystoreInstance[] keystores = PortletManager.getCurrentServer(actionRequest).getKeystoreManager().getKeystores();

                        String[] keys = null;
                        for (int i = 0; i < keystores.length; i++) {
                            KeystoreInstance keystore = keystores[i];
                            if(keystore.getKeystoreName().equals(keyStore)) {
                                keys = keystore.getUnlockedKeys();
                            }
                        }
                        if(keys != null && keys.length == 1) {
                            setProperty(secure, "keyAlias", keys[0]);
                        } else {
                            throw new PortletException("Cannot handle keystores with anything but 1 unlocked private key");
                        }
                    } catch (KeystoreIsLocked locked) {
                        throw new PortletException(locked.getMessage());
                    }
                    String trustStore = actionRequest.getParameter("unlockTrustStore");
                    if(isValid(trustStore)) {setProperty(secure, "trustStore", trustStore);}
                } else if (server.equals(WEB_SERVER_TOMCAT)) {
                    if(isValid(truststoreType)) {setProperty(secure, "truststoreType", truststoreType);}
                    if(isValid(truststoreFile)) {setProperty(secure, "truststoreFileName", truststoreFile);}
                    if(isValid(truststorePass)) {setProperty(secure, "truststorePassword", truststorePass);}
                } else {
                    //todo:   Handle "should not occur" condition
                }
            }
            // Start the connector
            try {
                ((GeronimoManagedBean)connector).startRecursive();
            } catch (Exception e) {
                log.error("Unable to start connector", e); //todo: get into rendered page somehow?
            }
            actionResponse.setRenderParameter("mode", "list");
        } else if(mode.equals("save")) { // User just submitted the form to update a connector
            // Get submitted values
            //todo: lots of validation
            String host = actionRequest.getParameter("host");
            int port = Integer.parseInt(actionRequest.getParameter("port"));
            int maxThreads = Integer.parseInt(actionRequest.getParameter("maxThreads"));
            Integer minThreads = getInteger(actionRequest, "minThreads");
            String connectorURI = actionRequest.getParameter("connectorURI");
            // Identify and update the connector
            WebConnector connector = PortletManager.getWebConnector(actionRequest, new AbstractName(URI.create(connectorURI)));
            if(connector != null) {
                connector.setHost(host);
                connector.setPort(port);
                connector.setMaxThreads(maxThreads);
                if(server.equals(WEB_SERVER_JETTY)) {
                    if(minThreads != null) {
                        setProperty(connector,"minThreads",minThreads);
                    }
                    else if (server.equals(WEB_SERVER_TOMCAT)) {
                        //todo:   Any Tomcat specific processing?
                    }
                    else {
                        //todo:   Handle "should not occur" condition
                    }
                }
                if(connector instanceof SecureConnector) {
                    String keystoreType = actionRequest.getParameter("keystoreType");
                    String keystoreFile = actionRequest.getParameter("keystoreFile");
                    String privateKeyPass = actionRequest.getParameter("privateKeyPassword");
                    String keystorePass = actionRequest.getParameter("keystorePassword");
                    String secureProtocol = actionRequest.getParameter("secureProtocol");
                    String algorithm = actionRequest.getParameter("algorithm");
                    String truststoreType = actionRequest.getParameter("truststoreType");
                    String truststoreFile = actionRequest.getParameter("truststoreFile");
                    String truststorePass = actionRequest.getParameter("truststorePassword");
                    boolean clientAuth = isValid(actionRequest.getParameter("clientAuth"));
                    SecureConnector secure = (SecureConnector) connector;
                    if(isValid(keystoreType)) {secure.setKeystoreType(keystoreType);}
                    if(isValid(keystoreFile)) {secure.setKeystoreFileName(keystoreFile);}
                    if(isValid(keystorePass)) {secure.setKeystorePassword(keystorePass);}
                    if(isValid(secureProtocol)) {secure.setSecureProtocol(secureProtocol);}
                    if(isValid(algorithm)) {secure.setAlgorithm(algorithm);}
                    secure.setClientAuthRequired(clientAuth);
                    if(server.equals(WEB_SERVER_JETTY)) {
                        if(isValid(privateKeyPass)) {setProperty(secure, "keyPassword", privateKeyPass);}
                    }
                    else if (server.equals(WEB_SERVER_TOMCAT)) {
                        if(isValid(truststoreType)) {setProperty(secure, "truststoreType", truststoreType);}
View Full Code Here

                        //todo:   Handle "should not occur" condition
                    }
                    renderRequest.setAttribute("mode", "save");

                    if(connector instanceof SecureConnector) {
                        SecureConnector secure = (SecureConnector) connector;
                        renderRequest.setAttribute("keystoreFile",secure.getKeystoreFileName());
                        renderRequest.setAttribute("keystoreType",secure.getKeystoreType());
                        renderRequest.setAttribute("algorithm",secure.getAlgorithm());
                        renderRequest.setAttribute("secureProtocol",secure.getSecureProtocol());
                        if(secure.isClientAuthRequired()) {
                            renderRequest.setAttribute("clientAuth", Boolean.TRUE);
                        }
                        if(server.equals(WEB_SERVER_TOMCAT)) {
                            String truststoreFile = (String)getProperty(secure, "truststoreFileName");
                            String truststoreType = (String)getProperty(secure, "truststoreType");
View Full Code Here

                String algorithm = actionRequest.getParameter("algorithm");
                String truststoreType = actionRequest.getParameter("truststoreType");
                String truststoreFile = actionRequest.getParameter("truststoreFile");
                String truststorePass = actionRequest.getParameter("truststorePassword");
                boolean clientAuth = isValid(actionRequest.getParameter("clientAuth"));
                SecureConnector secure = (SecureConnector) connector;
                if(isValid(keystoreType)) {secure.setKeystoreType(keystoreType);}
                if(isValid(keystoreFile)) {secure.setKeystoreFileName(keystoreFile);}
                if(isValid(keystorePass)) {secure.setKeystorePassword(keystorePass);}
                if(isValid(secureProtocol)) {secure.setSecureProtocol(secureProtocol);}
                if(isValid(algorithm)) {secure.setAlgorithm(algorithm);}
                secure.setClientAuthRequired(clientAuth);
                if(server.equals(WEB_SERVER_JETTY)) {
                    if(isValid(privateKeyPass)) {setProperty(secure, "keyPassword", privateKeyPass);}
                    String keyStore = actionRequest.getParameter("unlockKeyStore");
                    setProperty(secure, "keyStore", keyStore);
                    try {
                        KeystoreInstance[] keystores = PortletManager.getCurrentServer(actionRequest).getKeystoreManager().getKeystores();

                        String[] keys = null;
                        for (int i = 0; i < keystores.length; i++) {
                            KeystoreInstance keystore = keystores[i];
                            if(keystore.getKeystoreName().equals(keyStore)) {
                                keys = keystore.getUnlockedKeys(null);
                            }
                        }
                        if(keys != null && keys.length == 1) {
                            setProperty(secure, "keyAlias", keys[0]);
                        } else {
                            throw new PortletException("Cannot handle keystores with anything but 1 unlocked private key");
                        }
                    } catch (KeystoreException e) {
                        throw new PortletException(e);
                    }
                    String trustStore = actionRequest.getParameter("unlockTrustStore");
                    // "" is a valid trustStore value, which means the parameter should be cleared
                    setProperty(secure, "trustStore", isValid(trustStore) ? trustStore : null);
                } else if (server.equals(WEB_SERVER_TOMCAT)) {
                    if(isValid(truststoreType)) {setProperty(secure, "truststoreType", truststoreType);}
                    if(isValid(truststoreFile)) {setProperty(secure, "truststoreFileName", truststoreFile);}
                    if(isValid(truststorePass)) {setProperty(secure, "truststorePassword", truststorePass);}
                } else {
                    //todo:   Handle "should not occur" condition
                }
            }
            // Start the connector
            try {
                ((GeronimoManagedBean)connector).startRecursive();
            } catch (Exception e) {
                log.error("Unable to start connector", e); //todo: get into rendered page somehow?
            }
            actionResponse.setRenderParameter("mode", "list");
        } else if(mode.equals("save")) { // User just submitted the form to update a connector
            // Get submitted values
            //todo: lots of validation
            String host = actionRequest.getParameter("host");
            int port = Integer.parseInt(actionRequest.getParameter("port"));
            int maxThreads = Integer.parseInt(actionRequest.getParameter("maxThreads"));
            String connectorURI = actionRequest.getParameter("connectorURI");
            // Identify and update the connector
            WebConnector connector = PortletManager.getWebConnector(actionRequest, new AbstractName(URI.create(connectorURI)));
            if(connector != null) {
                if(!connector.getHost().equals(host)) connector.setHost(host);
                if(connector.getPort() != port) connector.setPort(port);
                if(connector.getMaxThreads() != maxThreads) connector.setMaxThreads(maxThreads);
                if(connector instanceof SecureConnector) {
                    String keystoreType = actionRequest.getParameter("keystoreType");
                    String keystoreFile = actionRequest.getParameter("keystoreFile");
                    String privateKeyPass = actionRequest.getParameter("privateKeyPassword");
                    String keystorePass = actionRequest.getParameter("keystorePassword");
                    String secureProtocol = actionRequest.getParameter("secureProtocol");
                    String algorithm = actionRequest.getParameter("algorithm");
                    String truststoreType = actionRequest.getParameter("truststoreType");
                    String truststoreFile = actionRequest.getParameter("truststoreFile");
                    String truststorePass = actionRequest.getParameter("truststorePassword");
                    boolean clientAuth = isValid(actionRequest.getParameter("clientAuth"));
                    SecureConnector secure = (SecureConnector) connector;
                    if(isValid(keystoreType) && !keystoreType.equals(secure.getKeystoreType())) {secure.setKeystoreType(keystoreType);}
                    if(isValid(keystoreFile) && !keystoreFile.equals(secure.getKeystoreFileName())) {secure.setKeystoreFileName(keystoreFile);}
                    if(isValid(keystorePass)) {secure.setKeystorePassword(keystorePass);}
                    if(isValid(secureProtocol) && !secureProtocol.equals(secure.getSecureProtocol())) {secure.setSecureProtocol(secureProtocol);}
                    if(isValid(algorithm) && !algorithm.equals(secure.getAlgorithm())) {secure.setAlgorithm(algorithm);}
                    if(clientAuth != secure.isClientAuthRequired()) secure.setClientAuthRequired(clientAuth);
                    if(server.equals(WEB_SERVER_JETTY)) {
                        if(isValid(privateKeyPass)) {setProperty(secure, "keyPassword", privateKeyPass);}
                        String keyStore = actionRequest.getParameter("unlockKeyStore");
                        String trustStore = actionRequest.getParameter("unlockTrustStore");
                        setProperty(secure, "keyStore", keyStore);
View Full Code Here

                        //todo:   Handle "should not occur" condition
                    }
                    renderRequest.setAttribute("mode", "save");

                    if(connector instanceof SecureConnector) {
                        SecureConnector secure = (SecureConnector) connector;
                        renderRequest.setAttribute("keystoreFile",secure.getKeystoreFileName());
                        renderRequest.setAttribute("keystoreType",secure.getKeystoreType());
                        renderRequest.setAttribute("algorithm",secure.getAlgorithm());
                        renderRequest.setAttribute("secureProtocol",secure.getSecureProtocol());
                        if(secure.isClientAuthRequired()) {
                            renderRequest.setAttribute("clientAuth", Boolean.TRUE);
                        }
                        if(server.equals(WEB_SERVER_JETTY)) {
                            String keyStore = (String)getProperty(secure, "keyStore");
                            String trustStore = (String)getProperty(secure, "trustStore");
View Full Code Here

                        String privateKeyPass = actionRequest.getParameter("privateKeyPassword");
                        String keystorePass = actionRequest.getParameter("keystorePassword");
                        String secureProtocol = actionRequest.getParameter("secureProtocol");
                        String algorithm = actionRequest.getParameter("algorithm");
                        boolean clientAuth = isValid(actionRequest.getParameter("clientAuth"));
                        SecureConnector secure = (SecureConnector) connector;
                        if(isValid(keystoreType)) {secure.setKeystoreType(keystoreType);}
                        if(isValid(keystoreFile)) {secure.setKeystoreFileName(keystoreFile);}
                        if(isValid(keystorePass)) {secure.setKeystorePassword(keystorePass);}
                        if(isValid(secureProtocol)) {secure.setSecureProtocol(secureProtocol);}
                        if(isValid(algorithm)) {secure.setAlgorithm(algorithm);}
                        secure.setClientAuthRequired(clientAuth);
                        if(server.equals(WEB_SERVER_JETTY)) {
                            if(isValid(privateKeyPass)) {setProperty(secure, "keyPassword", privateKeyPass);}
                        }
                        else if (server.equals(WEB_SERVER_TOMCAT)) {
                            //todo:   Any Tomcat specific processing?
                        }
                        else {
                            //todo:   Handle "should not occur" condition
                        }
                    }
                    // Start the connector
                    try {
                        ((GeronimoManagedBean)connector).startRecursive();
                    } catch (Exception e) {
                        log.error("Unable to start connector", e); //todo: get into rendered page somehow?
                    }
                    actionResponse.setRenderParameter("mode", "list");
                } else if(mode.equals("save")) { // User just submitted the form to update a connector
                    // Get submitted values
                    //todo: lots of validation
                    String host = actionRequest.getParameter("host");
                    int port = Integer.parseInt(actionRequest.getParameter("port"));
                    int maxThreads = Integer.parseInt(actionRequest.getParameter("maxThreads"));
                    Integer minThreads = getInteger(actionRequest, "minThreads");
                    String objectName = actionRequest.getParameter("objectName");
                    // Identify and update the connector
                    WebConnector connector = null;
                    WebConnector all[] = PortletManager.getWebConnectors(actionRequest, managerName);
                    for (int i = 0; i < all.length; i++) {
                        WebConnector conn = all[i];
                        if(((GeronimoManagedBean)conn).getObjectName().equals(objectName)) {
                            connector = conn;
                            break;
                        }
                    }
                    if(connector != null) {
                        connector.setHost(host);
                        connector.setPort(port);
                        connector.setMaxThreads(maxThreads);
                        if(server.equals(WEB_SERVER_JETTY)) {
                            if(minThreads != null) {
                                setProperty(connector,"minThreads",minThreads);
                            }
                            else if (server.equals(WEB_SERVER_TOMCAT)) {
                                //todo:   Any Tomcat specific processing?
                            }
                            else {
                                //todo:   Handle "should not occur" condition
                            }
                        }
                        if(connector instanceof SecureConnector) {
                            String keystoreType = actionRequest.getParameter("keystoreType");
                            String keystoreFile = actionRequest.getParameter("keystoreFile");
                            String privateKeyPass = actionRequest.getParameter("privateKeyPassword");
                            String keystorePass = actionRequest.getParameter("keystorePassword");
                            String secureProtocol = actionRequest.getParameter("secureProtocol");
                            String algorithm = actionRequest.getParameter("algorithm");
                            boolean clientAuth = isValid(actionRequest.getParameter("clientAuth"));
                            SecureConnector secure = (SecureConnector) connector;
                            if(isValid(keystoreType)) {secure.setKeystoreType(keystoreType);}
                            if(isValid(keystoreFile)) {secure.setKeystoreFileName(keystoreFile);}
                            if(isValid(keystorePass)) {secure.setKeystorePassword(keystorePass);}
                            if(isValid(secureProtocol)) {secure.setSecureProtocol(secureProtocol);}
                            if(isValid(algorithm)) {secure.setAlgorithm(algorithm);}
                            secure.setClientAuthRequired(clientAuth);
                            if(server.equals(WEB_SERVER_JETTY)) {
                                if(isValid(privateKeyPass)) {setProperty(secure, "keyPassword", privateKeyPass);}
                            }
                            else if (server.equals(WEB_SERVER_TOMCAT)) {
                                //todo:   Any Tomcat specific processing?
View Full Code Here

                            //todo:   Handle "should not occur" condition
                        }
                        renderRequest.setAttribute("mode", "save");

                        if(connector instanceof SecureConnector) {
                            SecureConnector secure = (SecureConnector) connector;
                            renderRequest.setAttribute("keystoreFile",secure.getKeystoreFileName());
                            renderRequest.setAttribute("keystoreType",secure.getKeystoreType());
                            renderRequest.setAttribute("algorithm",secure.getAlgorithm());
                            renderRequest.setAttribute("secureProtocol",secure.getSecureProtocol());
                            if(secure.isClientAuthRequired()) {
                                renderRequest.setAttribute("clientAuth", Boolean.TRUE);
                            }
                        }

                        if(connector.getProtocol().equals(WebManager.PROTOCOL_HTTPS)) {
View Full Code Here

       
        AbstractNameQuery connectorQuery = new AbstractNameQuery(SecureConnector.class.getName());
        Set set = kernel.listGBeans(connectorQuery);
        for(Iterator itr = set.iterator(); itr.hasNext(); ){
            try {
                SecureConnector connector = (SecureConnector)kernel.getGBean((AbstractName)itr.next());
                if(connector.isClientAuthRequired())
                    return connector.getPort();
            } catch(Exception e) {
                e.printStackTrace();
            }
        }
        return -1;
View Full Code Here

TOP

Related Classes of org.apache.geronimo.management.geronimo.SecureConnector

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.