Examples of Console


Examples of org.apache.felix.karaf.shell.console.jline.Console

                in = new PipedOutputStream();
                out = new PipedInputStream();
                PrintStream pipedOut = new PrintStream(new PipedOutputStream(out), true);

                console = new Console(commandProcessor,
                                      new PipedInputStream(in),
                                      pipedOut,
                                      pipedOut,
                                      new WebTerminal(TERM_WIDTH, TERM_HEIGHT),
                                      new AggregateCompleter(completers),
View Full Code Here

Examples of org.apache.felix.mishell.console.Console

    //NOTE: new javax.script.EngineManager() uses context class loader
    //We've changed that to use EngineManager(ClassLoader loader)
    //Alternatively, we could instantiate it in a separate thread with proper context class loader set.
    //TODO: not sure wether resources are correctly freed. A running script will probably keep running, for example, if it has got threads
    //but that would hang the console, which is quite primitive yet. (it would need a 'run [script] &' idiom)
    console = new Console(new JMXEngineContext("javascript", new OSGiScriptEngineManager(context)));
    Thread t=new Thread(console);
    //At least JRuby engine (maybe others too) uses context class loaders internally
    //So this is to prevent  problems with that: context cl=console class loader which in turn
    //loads the manager and therefore engine factory
//    t.setContextClassLoader(this.getClass().getClassLoader());
View Full Code Here

Examples of org.apache.hadoop.test.Console

  @Test
  public void testXmlGatewayDescriptorStoreFailure() throws IOException {
    GatewayDescriptor descriptor = GatewayDescriptorFactory.create()
        .addResource().addFilter().param().up().up().up();

    Console console = new Console();
    try {
      console.capture();
      GatewayDescriptorFactory.store( descriptor, "xml", new BrokenWriter() );
      fail( "Expected IOException" );
    } catch( IOException e ) {
      assertThat( e.getMessage(), containsString( "BROKEN" ) );
    } finally {
      console.release();
    }

  }
View Full Code Here

Examples of org.apache.jackrabbit.vault.util.console.Console

        return ctx;
    }

    public Console getConsole() {
        if (console == null) {
            console = new Console(this);
            iCtx = new ConsoleExecutionContext(this);
            iCtx.installCommand(new CmdLs());
            iCtx.installCommand(new CmdCd());
            iCtx.installCommand(new CmdCtx());
            try {
View Full Code Here

Examples of org.apache.karaf.shell.console.Console

                out = new PipedInputStream();
                PrintStream pipedOut = new PrintStream(new PipedOutputStream(out), true);

                final Subject subject = new Subject();
                subject.getPrincipals().add(new UserPrincipal("karaf"));
                Console console = consoleFactory.create(commandProcessor,
                        threadIO,
                        new PipedInputStream(in),
                        pipedOut,
                        pipedOut,
                        new WebTerminal(TERM_WIDTH, TERM_HEIGHT),
View Full Code Here

Examples of org.apache.karaf.shell.console.jline.Console

        setUser("unknown");
    }

    @Override
    protected Console createConsole(CommandProcessorImpl commandProcessor, InputStream in, PrintStream out, PrintStream err, Terminal terminal) throws Exception {
        return new Console(commandProcessor, in, out, err, terminal, null) {

            /**
             * If you don't overwrite, then karaf will use the welcome message found in the
             * following resource files:
             * <ul>
 
View Full Code Here

Examples of org.apache.qpid.qmf2.console.Console

            System.out.println("*** Starting Test2 asynchronous Agent discovery using WorkQueue API ***");
               
            BlockingNotifier notifier = new BlockingNotifier();

            Connection connection = ConnectionHelper.createConnection(url, "{reconnect: true}");
            _console = new Console(notifier);
//console.disableAgentDiscovery(); // To miss all notifications this needs done before addConnection()
            _console.addConnection(connection);

            int count = 0;
            while (true)
View Full Code Here

Examples of org.apache.qpid.qmf2.console.Console

    {
        try
        {
            System.out.println("*** Starting Test1 synchronous Agent discovery ***");
            Connection connection = ConnectionHelper.createConnection(url, "{reconnect: true}");
            _console = new Console();
            _console.addConnection(connection);

            System.out.println("*** Test1 testing _console.getAgents(): ***");
            List<Agent> agents = _console.getAgents();

View Full Code Here

Examples of org.apache.qpid.qmf2.console.Console

        try
        {
            System.out.println("*** Starting PartialGetObjectsTest used to test schema retrieval ***");
               
            Connection connection = ConnectionHelper.createConnection(url, "{reconnect: true}");
            _console = new Console(this);
            _console.addConnection(connection);

            // First we create a large number of queues using the QMF2 create method on the broker object
            List<QmfConsoleData> brokers = _console.getObjects("org.apache.qpid.broker", "broker");
            if (brokers.isEmpty())
View Full Code Here

Examples of org.apache.qpid.qmf2.console.Console

        _url = url;
        _filter = filter;
        try
        {
            Connection connection = ConnectionHelper.createConnection(url, connectionOptions);       
            _console = new Console(this);
            _console.addConnection(connection);

            // Wait until the broker Agent has been discovered
            _broker = _console.findAgent("broker");
            if (_broker != null)
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.