Klasse AgentFileVisitor<T extends Serializable>

Typparameter:
T - the type of the results
Alle implementierten Schnittstellen:
FilePath.FileCallable<AgentFileVisitor.FileVisitorResult<T>>, Serializable, org.jenkinsci.remoting.RoleSensitive

public abstract class AgentFileVisitor<T extends Serializable> extends MasterToSlaveFileCallable<AgentFileVisitor.FileVisitorResult<T>>
Finds all files that match a specified Ant file pattern and visits these files with the processing method processFile(Path, Charset, FilteredLog), that has to be implemented by concrete subclasses. This callable will be invoked on an agent so all fields and the returned list of results need to be Serializable.
Autor:
Ullrich Hafner
Siehe auch:
  • Konstruktordetails

    • AgentFileVisitor

      protected AgentFileVisitor(String filePattern, String encoding, boolean followSymbolicLinks, boolean errorOnEmptyFiles)
      Creates a new instance of AgentFileVisitor.
      Parameter:
      filePattern - ant file-set pattern to scan for files to parse
      encoding - encoding of the files to parse
      followSymbolicLinks - determines whether the visitor should traverse symbolic links
      errorOnEmptyFiles - determines whether the visitor should log errors if a file is empty
  • Methodendetails

    • invoke

      public final AgentFileVisitor.FileVisitorResult<T> invoke(File workspace, hudson.remoting.VirtualChannel channel)
    • plural

      protected String plural(int count, String itemName)
      Creates the correct singular or plural form of the specified word depending on the size of the elements.
      Parameter:
      count - the count of elements
      itemName - the name of the items (singular)
      Gibt zurück:
      the message
    • processFile

      protected abstract Optional<T> processFile(Path file, Charset charset, edu.hm.hafner.util.FilteredLog log)