Class Pipe

  • All Implemented Interfaces:
    java.util.concurrent.Callable<Pipe.Result>, Process

    public class Pipe
    extends java.lang.Object
    implements java.util.concurrent.Callable<Pipe.Result>, Process
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Pipe.Result  
      • Nested classes/interfaces inherited from interface org.apache.felix.service.command.Process

        Process.Utils
    • Constructor Summary

      Constructors 
      Constructor Description
      Pipe​(Closure closure, org.apache.felix.gogo.runtime.CommandSessionImpl.JobImpl job, Parser.Statement statement, java.nio.channels.Channel[] streams, boolean[] toclose, boolean endOfPipe)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Pipe.Result call()  
      java.io.PrintStream err()  
      void error​(int error)
      Set the error code for the currently running pipe.
      static Pipe getCurrentPipe()  
      java.io.InputStream in()  
      boolean isTty​(int fd)
      Check if the given descriptor for the currently running pipe is the terminal or not.
      Job job()
      Get the job controlling this process
      java.io.PrintStream out()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Pipe

        public Pipe​(Closure closure,
                    org.apache.felix.gogo.runtime.CommandSessionImpl.JobImpl job,
                    Parser.Statement statement,
                    java.nio.channels.Channel[] streams,
                    boolean[] toclose,
                    boolean endOfPipe)
    • Method Detail

      • getCurrentPipe

        public static Pipe getCurrentPipe()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • in

        public java.io.InputStream in()
        Specified by:
        in in interface Process
      • out

        public java.io.PrintStream out()
        Specified by:
        out in interface Process
      • err

        public java.io.PrintStream err()
        Specified by:
        err in interface Process
      • job

        public Job job()
        Description copied from interface: Process
        Get the job controlling this process
        Specified by:
        job in interface Process
      • isTty

        public boolean isTty​(int fd)
        Description copied from interface: Process
        Check if the given descriptor for the currently running pipe is the terminal or not.
        Specified by:
        isTty in interface Process
      • error

        public void error​(int error)
        Description copied from interface: Process
        Set the error code for the currently running pipe.
        Specified by:
        error in interface Process
      • call

        public Pipe.Result call()
        Specified by:
        call in interface java.util.concurrent.Callable<Pipe.Result>