com.sonyericsson.jenkins.plugins.bfa.model
Class BuildLogFailureReader

java.lang.Object
  extended by com.sonyericsson.jenkins.plugins.bfa.model.FailureReader
      extended by com.sonyericsson.jenkins.plugins.bfa.model.BuildLogFailureReader

public class BuildLogFailureReader
extends FailureReader

Reader used to find indications of a failure cause.

Author:
Tomas Westling <tomas.westling@sonymobile.com>

Nested Class Summary
 
Nested classes/interfaces inherited from class com.sonyericsson.jenkins.plugins.bfa.model.FailureReader
FailureReader.InterruptibleCharSequence
 
Field Summary
 
Fields inherited from class com.sonyericsson.jenkins.plugins.bfa.model.FailureReader
indication
 
Constructor Summary
BuildLogFailureReader(BuildLogIndication indication)
          Standard constructor.
 
Method Summary
 FoundIndication scan(hudson.model.AbstractBuild build)
          Scans a build log.
 FoundIndication scan(hudson.model.AbstractBuild build, PrintStream buildLog)
          Scans for indications of a failure cause in a build log.
 
Methods inherited from class com.sonyericsson.jenkins.plugins.bfa.model.FailureReader
scanMultiLineOneFile, scanOneFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BuildLogFailureReader

public BuildLogFailureReader(BuildLogIndication indication)
Standard constructor.

Parameters:
indication - the indication to look for.
Method Detail

scan

public FoundIndication scan(hudson.model.AbstractBuild build)
                     throws IOException
Scans a build log.

Specified by:
scan in class FailureReader
Parameters:
build - - the build whose log should be scanned.
Returns:
a FoundIndication if the pattern given by this BuildLogFailureReader is found in the log of the given build; return null otherwise.
Throws:
IOException - if so.

scan

public FoundIndication scan(hudson.model.AbstractBuild build,
                            PrintStream buildLog)
Scans for indications of a failure cause in a build log. Note: If an exception occurs during the scanning, information about the exception is appended to the build log.

Specified by:
scan in class FailureReader
Parameters:
build - the build to scan for indications.
buildLog - the log of the build.
Returns:
a FoundIndication if something was found, null if not.


Copyright © 2004-2014. All Rights Reserved.