Class FailureReader
java.lang.Object
com.sonyericsson.jenkins.plugins.bfa.model.FailureReader
- Direct Known Subclasses:
 BuildLogFailureReader,MultilineBuildLogFailureReader
Reader used to find indications of a failure cause.
- Author:
 - Tomas Westling <tomas.westling@sonymobile.com>
 
- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classCharSequence that notices thread interrupts -- as might be necessary to recover from a loose regex on unexpected challenging input. - 
Field Summary
Fields - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionscan(AbstractBuild build) Deprecated.scan(AbstractBuild build, PrintStream buildLog) Deprecated.Scans a build log.scan(Run build, PrintStream buildLog) Scans for indications of a failure cause.protected FoundIndicationscanMultiLineOneFile(Run build, LineNumberReader reader, String currentFile) Scans one file for the required multi-line pattern.static List<FoundFailureCause>scanSingleLinePatterns(List<FailureCause> causes, Run build, BufferedReader reader, String currentFile) Checks all patterns one-by-one for entire file. 
- 
Field Details
- 
indication
The indication we are looking for. 
 - 
 - 
Constructor Details
- 
FailureReader
Standard constructor.- Parameters:
 indication- the indication to look for.
 
 - 
 - 
Method Details
- 
scan
Deprecated.Scans a build log.- Parameters:
 build- - the build whose log should be scanned.- Returns:
 - a FoundIndication if the pattern given by this FailureReader is found in the log of the given build; return null otherwise.
 - Throws:
 IOException- if so.
 - 
scan
Scans a build log.- Parameters:
 build- - the build whose log should be scanned.- Returns:
 - a FoundIndication if the pattern given by this FailureReader is found in the log of the given build; return null otherwise.
 - Throws:
 IOException- if so.
 - 
scan
Deprecated.Scans for indications of a failure cause.- Parameters:
 build- the build to scan for indications.buildLog- the log of the build.- Returns:
 - a FoundIndication if something was found, null if not.
 
 - 
scan
Scans for indications of a failure cause.- Parameters:
 build- the build to scan for indications.buildLog- the log of the build.- Returns:
 - a FoundIndication if something was found, null if not.
 
 - 
scanSingleLinePatterns
public static List<FoundFailureCause> scanSingleLinePatterns(List<FailureCause> causes, Run build, BufferedReader reader, String currentFile) throws IOException Checks all patterns one-by-one for entire file.- Parameters:
 causes- list of failure causes that we a looking for.build- current build.reader- file reader.currentFile- file name.- Returns:
 - found indications.
 - Throws:
 IOException- Exception.
 - 
scanMultiLineOneFile
protected FoundIndication scanMultiLineOneFile(Run build, LineNumberReader reader, String currentFile) throws IOException Scans one file for the required multi-line pattern.- Parameters:
 build- the build we are processing.reader- the reader to read from.currentFile- the file path of the file we want to scan.- Returns:
 - a FoundIndication if we find the pattern, null if not.
 - Throws:
 IOException- if problems occur in the reader handling.
 
 - 
 
scan(hudson.model.Run).