hudson.plugins.perforce
Class HudsonPipedOutputStream
java.lang.Object
java.io.OutputStream
hudson.remoting.FastPipedOutputStream
hudson.plugins.perforce.HudsonPipedOutputStream
- All Implemented Interfaces:
- java.io.Closeable, java.io.Flushable
public class HudsonPipedOutputStream
- extends hudson.remoting.FastPipedOutputStream
Extended class of PipedOutputStream, used specifically for passing into
hudson launcher.launch() calls. The extra closeOnProcess method is
required as launcher.launch() does NOT close its output stream, which will
cause a deadlock if using read calls (that block) to read data.
The Hudson method in question that doesn't close it's output stream is
StreamCopyThread.class.
User contract: After calling launcher.launch(), pass its process into
closeOnProcess().
Example:
HudsonPipedOutputStream hudsonOut = new HudsonPipedOutputStream();
Proc process = hudsonLauncher.launch(cmd,env,hudsonOut,filePath);
hudsonOut.closeOnProcess(process);
- Author:
- Victor Szoltysek
| Methods inherited from class hudson.remoting.FastPipedOutputStream |
close, connect, finalize, flush, write, write, write |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HudsonPipedOutputStream
public HudsonPipedOutputStream()
closeOnProcess
public void closeOnProcess(hudson.Proc process)
Copyright © 2010. All Rights Reserved.