Package io.jenkins.plugins.util
Klasse AgentFileVisitor<T extends Serializable>
java.lang.Object
jenkins.MasterToSlaveFileCallable<AgentFileVisitor.FileVisitorResult<T>>
io.jenkins.plugins.util.AgentFileVisitor<T>
- 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:
-
Verschachtelte Klassen - Übersicht
Modifizierer und TypKlasseBeschreibungstatic class
The results for all found files. -
Konstruktorübersicht
ModifiziererKonstruktorBeschreibungprotected
AgentFileVisitor
(String filePattern, String encoding, boolean followSymbolicLinks, boolean errorOnEmptyFiles) Creates a new instance ofAgentFileVisitor
. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungprotected String
Creates the correct singular or plural form of the specified word depending on the size of the elements.processFile
(Path file, Charset charset, edu.hm.hafner.util.FilteredLog log) Von Klasse geerbte Methoden jenkins.MasterToSlaveFileCallable
checkRoles
-
Konstruktordetails
-
AgentFileVisitor
protected AgentFileVisitor(String filePattern, String encoding, boolean followSymbolicLinks, boolean errorOnEmptyFiles) Creates a new instance ofAgentFileVisitor
.- Parameter:
filePattern
- ant file-set pattern to scan for files to parseencoding
- encoding of the files to parsefollowSymbolicLinks
- determines whether the visitor should traverse symbolic linkserrorOnEmptyFiles
- 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
Creates the correct singular or plural form of the specified word depending on the size of the elements.- Parameter:
count
- the count of elementsitemName
- the name of the items (singular)- Gibt zurück:
- the message
-
processFile
-