Package org.knopflerfish.service.console

Examples of org.knopflerfish.service.console.ConsoleService


    createSession(name.toString());
  }
  public void createSession(String name) {
    try {
      ServiceReference srl = Activator.bc.getServiceReference(ConsoleService.class.getName());
      ConsoleService console = (ConsoleService) Activator.bc.getService(srl);
      PipedWriter pipeToConsole = new PipedWriter();
      Reader consoleIn = new PipedReader(pipeToConsole);
      toConsole = new PrintWriter(pipeToConsole);

      PipedReader pipeFromConsole = new PipedReader();
      PrintWriter consoleOut = new PrintWriter(new PipedWriter(pipeFromConsole));
      fromConsole = pipeFromConsole;
      consoleSession = console.runSession(name, consoleIn, consoleOut);
    } catch (Exception e) {}
  }
View Full Code Here


  }

  public String[] setAlias(String key, String[] val) {
    try {
      ServiceReference srl = Activator.bc.getServiceReference(ConsoleService.class.getName());
      ConsoleService console = (ConsoleService) Activator.bc.getService(srl);
      return console.setAlias(key, val);
    } catch (Exception e) {}
    return null;
  }
View Full Code Here

    /*---------------------------------------------------------------------------*
     *        ServiceTrackerCustomizer implementation
     *---------------------------------------------------------------------------*/

    public Object addingService(ServiceReference reference) {
        ConsoleService console = (ConsoleService) bc.getService(reference);
        try {
            consoleSession = console.runSession("console tty", reader, writer);
        } catch (IOException ioe) {
            log(LogService.LOG_ERROR,
                "Failed to start console session, can not continue");
        }
        return console;
View Full Code Here

TOP

Related Classes of org.knopflerfish.service.console.ConsoleService

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.