public Shell getShell(String key) {
        Shell myShell = null;
        try {
            if (!shells.containsKey(key)) {
                return null;
            }
            Object obj = shells.get(key);
            if (obj instanceof Class) {
                Class<?> shclass = (Class<?>) obj;
                Method factory = shclass.getMethod("createShell");
                log.debug("[Factory Method] " + factory.toString());
                myShell = (Shell) factory.invoke(shclass);
            }
            if (obj instanceof Shell) {
                myShell = (Shell) obj.getClass().newInstance();
            }
        } catch (Exception e) {
            log.error("getShell()", e);
        }

        return myShell;
    }// getShell