Interface CockpitJarCache
-
- All Superinterfaces:
java.lang.AutoCloseable,java.io.Closeable
- All Known Implementing Classes:
DefaultCockpitJarCache
public interface CockpitJarCache extends java.io.CloseableCache of loaded jar files and entries found in them
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddEntry(java.io.File rootPath, java.util.jar.JarFile jarFile, java.util.jar.JarEntry entry)Adds new result of searching for entry into cachevoidaddJarFile(java.io.File filePath, java.util.jar.JarFile jarFile)Adds a loaded jar file into cachebooleancontainsEntry(java.io.File rootPath, java.lang.String resourceName)Checks whether result of searching for entry is cachedbooleancontainsJarFile(java.io.File filePath)Checks whether a jar file is cachedjava.util.jar.JarEntrygetEntry(java.io.File rootPath, java.lang.String resourceName)Retrieves previously cached result of searching for entryjava.util.jar.JarFilegetEntryJarFile(java.io.File rootPath, java.lang.String resourceName)Retrieves jar file of previously cached result of searching for entryjava.util.jar.JarFilegetJarFile(java.io.File filePath)Retrieves a jar file from cachejava.util.jar.JarEntryremoveEntry(java.io.File rootPath, java.lang.String resourceName)Removes previously cached result of searching for entryjava.util.jar.JarFileremoveJarFile(java.io.File filePath)Removes a loaded jar file from cache
-
-
-
Method Detail
-
addJarFile
void addJarFile(java.io.File filePath, java.util.jar.JarFile jarFile)Adds a loaded jar file into cache- Parameters:
filePath- full path to jar filejarFile- loaded jar file
-
removeJarFile
java.util.jar.JarFile removeJarFile(java.io.File filePath)
Removes a loaded jar file from cache- Parameters:
filePath- full path to jar file- Returns:
- jar file removed ot
nullif there was nothing cached for provided path
-
containsJarFile
boolean containsJarFile(java.io.File filePath)
Checks whether a jar file is cached- Parameters:
filePath- full path to jar file- Returns:
trueif jar file is cached
-
getJarFile
java.util.jar.JarFile getJarFile(java.io.File filePath)
Retrieves a jar file from cache- Parameters:
filePath- full path to jar file- Returns:
- jar file or
nullif jar file is not cached
-
addEntry
void addEntry(java.io.File rootPath, java.util.jar.JarFile jarFile, java.util.jar.JarEntry entry)Adds new result of searching for entry into cache- Parameters:
rootPath- root path, in which an entry was foundjarFile- jar file in which an entry was foundentry- entry found
-
removeEntry
java.util.jar.JarEntry removeEntry(java.io.File rootPath, java.lang.String resourceName)Removes previously cached result of searching for entry- Parameters:
rootPath- root path, in which an entry was foundresourceName- name of resource searched- Returns:
- jar entry removed ot
nullif there was nothing cached for provided conditions
-
containsEntry
boolean containsEntry(java.io.File rootPath, java.lang.String resourceName)Checks whether result of searching for entry is cached- Parameters:
rootPath- root path, in should have been foundresourceName- name of resource searched
-
getEntry
java.util.jar.JarEntry getEntry(java.io.File rootPath, java.lang.String resourceName)Retrieves previously cached result of searching for entry- Parameters:
rootPath- root path, in should have been foundresourceName- name of resource searched- Returns:
- jar entry or
nullif jar entry is not cached
-
getEntryJarFile
java.util.jar.JarFile getEntryJarFile(java.io.File rootPath, java.lang.String resourceName)Retrieves jar file of previously cached result of searching for entry- Parameters:
rootPath- root path, in should have been foundresourceName- name of resource searched- Returns:
- jar entry or
nullif jar entry is not cached
-
-