public abstract class P4HandlerAdapter extends java.lang.Object implements P4Handler
Constructor and Description |
---|
P4HandlerAdapter() |
Modifier and Type | Method and Description |
---|---|
abstract void |
process(java.lang.String line)
subclasses of P4HandlerAdapter must implement this routine
processing of one line of stdout or of stderr
|
void |
setOutput(java.lang.String p4Input)
set any data to be written to P4's stdin
|
void |
setProcessErrorStream(java.io.InputStream is)
connects the handler to the stderr of the Perforce process
|
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
|
void |
setProcessOutputStream(java.io.InputStream is)
connects the handler to the stdout of the Perforce process
|
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.
|
void |
stop()
stops the processing of streams
called from P4Base#execP4Command(String command, P4Handler handler)
|
public void setOutput(java.lang.String p4Input)
public abstract void process(java.lang.String line)
public void start() throws BuildException
start
in interface ExecuteStreamHandler
BuildException
- if there is a error.Execute.execute()
public void stop()
stop
in interface ExecuteStreamHandler
P4Base.execP4Command(String, P4Handler)
public void setProcessInputStream(java.io.OutputStream os) throws java.io.IOException
setProcessInputStream
in interface ExecuteStreamHandler
os
- the stream bringing input to the p4 executablejava.io.IOException
- under unknown circumstancespublic void setProcessErrorStream(java.io.InputStream is) throws java.io.IOException
setProcessErrorStream
in interface ExecuteStreamHandler
is
- stderr coming from Perforcejava.io.IOException
- under unknown circumstancespublic void setProcessOutputStream(java.io.InputStream is) throws java.io.IOException
setProcessOutputStream
in interface ExecuteStreamHandler
is
- stdout coming from Perforcejava.io.IOException
- under unknown circumstances