Methods Summary |
---|
public abstract void | process(java.lang.String line)subclasses of P4HandlerAdapter must implement this routine
processing of one line of stdout or of stderr
|
public void | setOutput(java.lang.String p4Input)set any data to be written to P4's stdin
// CheckStyle:VisibilityModifier ON
this.p4input = p4Input;
|
public void | setProcessErrorStream(java.io.InputStream is)connects the handler to the stderr of the Perforce process
this.es = is;
|
public void | setProcessInputStream(java.io.OutputStream os)connects the handler to the input stream into Perforce
used indirectly by tasks requiring to send specific standard input
such as p4label, p4change
this.os = os;
|
public void | setProcessOutputStream(java.io.InputStream is)connects the handler to the stdout of the Perforce process
this.is = is;
|
public void | start()this routine gets called by the execute routine of the Execute class
it connects the PumpStreamHandler to the input/output/error streams of the process.
if (p4input != null && p4input.length() > 0) {
myHandler = new PumpStreamHandler(new P4OutputStream(this), new P4OutputStream(this),
new ByteArrayInputStream(p4input.getBytes()));
} else {
myHandler = new PumpStreamHandler(new P4OutputStream(this), new P4OutputStream(this));
}
myHandler.setProcessInputStream(os);
myHandler.setProcessErrorStream(es);
myHandler.setProcessOutputStream(is);
myHandler.start();
|
public void | stop()stops the processing of streams
called from P4Base#execP4Command(String command, P4Handler handler)
myHandler.stop();
|