Package io.hawt.web.plugin.karaf.terminal

Examples of io.hawt.web.plugin.karaf.terminal.WebTerminal


        LOG.debug("Using Karaf 3.x Console API");
        ServiceReference ref = bundleContext.getServiceReference(KARAF3_CONSOLE_FACTORY);
        if (ref != null) {
            ConsoleFactory factory = (ConsoleFactory) bundleContext.getService(ref);
            Console console = factory.create(commandProcessor, threadIO, in, pipedOut, pipedOut, new WebTerminal(TERM_WIDTH, TERM_HEIGHT), null, null);
            return console;
        }

        return null;
    }
View Full Code Here


                // the old API does not have the threadIO parameter, so its only 7 parameters
                return ctr.newInstance(commandProcessor,
                        in,
                        pipedOut,
                        pipedOut,
                        new WebTerminal(TERM_WIDTH, TERM_HEIGHT),
                        null,
                        last);
            } else {
                LOG.debug("Using new Karaf 2.x Console API");

                // last parameter may be BundleContext if its redhat version of karaf
                // for ASF releases its a Runnable, and we should pass in null
                Object last = null;
                Class<?> type = ctr.getParameterTypes()[8];
                if (type != null && type.getSimpleName().equals("BundleContext")) {
                    last = bundleContext;
                }

                // the new API has the threadIO parameter, so it has 9 parameters
                return ctr.newInstance(commandProcessor,
                        threadIO,
                        in,
                        pipedOut,
                        pipedOut,
                        new WebTerminal(TERM_WIDTH, TERM_HEIGHT),
                        null,
                        null,
                        last);
            }
        }
View Full Code Here

TOP

Related Classes of io.hawt.web.plugin.karaf.terminal.WebTerminal

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.