|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.OutputStream
java.io.PipedOutputStream
hudson.plugins.perforce.HudsonPipedOutputStream
public class HudsonPipedOutputStream
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);
| Constructor Summary | |
|---|---|
HudsonPipedOutputStream()
|
|
| Method Summary | |
|---|---|
void |
closeOnProcess(hudson.Proc process)
|
| Methods inherited from class java.io.PipedOutputStream |
|---|
close, connect, flush, write, write |
| Methods inherited from class java.io.OutputStream |
|---|
write |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HudsonPipedOutputStream()
| Method Detail |
|---|
public void closeOnProcess(hudson.Proc process)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||