com.android.ide.common.process
Class CachedProcessOutputHandler

java.lang.Object
  extended by com.android.ide.common.process.BaseProcessOutputHandler
      extended by com.android.ide.common.process.CachedProcessOutputHandler
All Implemented Interfaces:
ProcessOutputHandler

public class CachedProcessOutputHandler
extends BaseProcessOutputHandler

Implementation of ProcessOutputHandler that allows getting access to the output after the call to ProcessExecutor.execute(ProcessInfo, ProcessOutputHandler). This can only be used once since only a single process output is kept for query after the process is run.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.android.ide.common.process.BaseProcessOutputHandler
BaseProcessOutputHandler.BaseProcessOutput
 
Constructor Summary
CachedProcessOutputHandler()
           
 
Method Summary
 ProcessOutput createOutput()
          Creates a ProcessOutput to be used by the process executor.
 BaseProcessOutputHandler.BaseProcessOutput getProcessOutput()
           
 void handleOutput(ProcessOutput processOutput)
          Handles the output after the process has run.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CachedProcessOutputHandler

public CachedProcessOutputHandler()
Method Detail

getProcessOutput

public BaseProcessOutputHandler.BaseProcessOutput getProcessOutput()

createOutput

@NonNull
public ProcessOutput createOutput()
Description copied from interface: ProcessOutputHandler
Creates a ProcessOutput to be used by the process executor.

Specified by:
createOutput in interface ProcessOutputHandler
Overrides:
createOutput in class BaseProcessOutputHandler

handleOutput

public void handleOutput(@NonNull
                         ProcessOutput processOutput)
                  throws ProcessException
Description copied from interface: ProcessOutputHandler
Handles the output after the process has run. This is called by the process executor before ProcessExecutor.execute(ProcessInfo, ProcessOutputHandler) returns.

Parameters:
processOutput - the process output to handle
Throws:
ProcessException