Package org.osgi.service.threadio

Examples of org.osgi.service.threadio.ThreadIO


 
  public Object execute(CharSequence commandline,                          
                        InputStream in,  
                        PrintStream out,
                        PrintStream err) {
    ThreadIO tio = (ThreadIO)cp.tioTracker.getService();
    if(tio == null) {
      throw new RuntimeException("No ThreadIO service available");
    }
    try {
      tio.setStreams(in, out, err);

      Program p = new Program(null, cp.commandProviders);
      p.getVarMap().putAll(sessionVars);

      Object r = p.exec(commandline);
      sessionVars.putAll(p.getVarMap());
      return r;
       
    } finally {
      tio.close();
    }
  }
View Full Code Here


     */
    public void run(CommandSession parent, String args[]) throws Exception {

        CommandShellImpl commandProcessor = new CommandShellImpl();
        // TODO: find out what the down side of not using a real ThreadIO implementation is.
        commandProcessor.setThreadio(new ThreadIO(){
            public void setStreams(InputStream in, PrintStream out, PrintStream err) {
            }
            public void close() {
            }
        });
View Full Code Here

     */
    public void run(CommandSession parent, String args[]) throws Exception {

        CommandShellImpl commandProcessor = new CommandShellImpl();
        // TODO: find out what the down side of not using a real ThreadIO implementation is.
        commandProcessor.setThreadio(new ThreadIO(){
            public void setStreams(InputStream in, PrintStream out, PrintStream err) {
            }
            public void close() {
            }
        });
View Full Code Here

TOP

Related Classes of org.osgi.service.threadio.ThreadIO

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.