Examples of ShutdownCLParser


Examples of org.apache.geronimo.cli.shutdown.ShutdownCLParser

    public int execute(Object opaque) {
        if (! (opaque instanceof ShutdownCLParser)) {
            throw new IllegalArgumentException("Argument type is [" + opaque.getClass() + "]; expected [" + ShutdownCLParser.class + "]");
        }
        ShutdownCLParser parser = (ShutdownCLParser) opaque;

        port = parser.getPort();
        if (port == null) {
            port = new Integer(DEFAULT_PORT);
        }

        host = parser.getHost();
        if (host == null) {
            host = "localhost";
        }

        secure = parser.isSecure();

        if (secure) {
            try {
                DeployUtils.setSecurityProperties();
            } catch (DeploymentException e) {
                System.err.println(e.getMessage());
                return 1;
            }
        }

        user = parser.getUser();

        password = parser.getPassword();

        if (user == null && password == null) {
            String uri = DeployUtils.getConnectionURI(host, port, secure);
            ClassLoader oldCL = Thread.currentThread().getContextClassLoader();
            Thread.currentThread().setContextClassLoader(DeployUtils.class.getClassLoader());
View Full Code Here

Examples of org.apache.geronimo.cli.shutdown.ShutdownCLParser

    public int execute(Object opaque) {
        if (! (opaque instanceof ShutdownCLParser)) {
            throw new IllegalArgumentException("Argument type is [" + opaque.getClass() + "]; expected [" + ShutdownCLParser.class + "]");
        }
        ShutdownCLParser parser = (ShutdownCLParser) opaque;

        port = parser.getPort();
        if (port == null) {
            port = new Integer(DEFAULT_PORT);
        }

        host = parser.getHost();
        if (host == null) {
            host = "localhost";
        }

        secure = parser.isSecure();

        if (secure) {
            try {
                DeployUtils.setSecurityProperties();
            } catch (DeploymentException e) {
                System.err.println(e.getMessage());
                return 1;
            }
        }

        user = parser.getUser();

        password = parser.getPassword();

        if (user == null && password == null) {
            String uri = DeployUtils.getConnectionURI(host, port, secure);
            ClassLoader oldCL = Thread.currentThread().getContextClassLoader();
            Thread.currentThread().setContextClassLoader(DeployUtils.class.getClassLoader());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.