Package com.sshtools.j2ssh.util

Examples of com.sshtools.j2ssh.util.ExtensionClassLoader


    private static Log log = LogFactory.getLog(SessionProviderFactory.class);
    private static SessionProviderFactory instance;
    HashMap providers = new HashMap();

    SessionProviderFactory() {
        ExtensionClassLoader classloader = ConfigurationLoader.getExtensionClassLoader();

        try {
            Enumeration en = classloader.getResources("session.provider");
            URL url = null;
            Properties properties;
            InputStream in;
            SessionProvider provider;
            String name;
            String id;

            while (en.hasMoreElements()) {
                try {
                    url = (URL) en.nextElement();
                    in = url.openStream();
                    properties = new Properties();
                    properties.load(in);
                    IOUtil.closeStream(in);

                    if (properties.containsKey("provider.class") &&
                            properties.containsKey("provider.name")) {
                        Class cls = classloader.loadClass(properties.getProperty(
                                    "provider.class"));
                        String optionsClassName = properties.getProperty(
                                "provider.options");
                        Class optionsClass = ((optionsClassName == null) ||
                            optionsClassName.equals("")) ? null
                                                         : classloader.loadClass(optionsClassName);
                        String pageclass;
                        int num = 1;
                        Vector pages = new Vector();

                        do {
                            pageclass = properties.getProperty("property.page." +
                                    String.valueOf(num), null);

                            if (pageclass != null) {
                                pages.add(classloader.loadClass(pageclass));
                                num++;
                            }
                        } while (pageclass != null);

                        Class[] propertypages = new Class[pages.size()];
View Full Code Here


            context.initialize();
            contexts.add(context);

            if (ext == null) {
                // We need to setup the dynamic class loading with the extension jars
                ext = new ExtensionClassLoader(ConfigurationLoader.class.getClassLoader());

                try {
                    //  Jar files to add to the classpath
                    File dir = new File(homedir + "lib" + File.separator +
                            "ext");
View Full Code Here

            context.initialize();
            contexts.add(context);

            if (ext == null) {
                // We need to setup the dynamic class loading with the extension jars
                ext = new ExtensionClassLoader(ConfigurationLoader.class.getClassLoader());

                try {
                    //  Jar files to add to the classpath
                    File dir = new File(homedir + "lib" + File.separator +
                            "ext");
View Full Code Here

TOP

Related Classes of com.sshtools.j2ssh.util.ExtensionClassLoader

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.