Package org.apache.struts2.util.fs
Class JBossFileManager
java.lang.Object
org.apache.struts2.util.fs.DefaultFileManager
org.apache.struts2.util.fs.JBossFileManager
- All Implemented Interfaces:
FileManager
FileManager implementation used with JBoss AS
-
Field Summary
Fields inherited from class org.apache.struts2.util.fs.DefaultFileManager
files, reloadingConfigs
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCollection<? extends URL>
getAllPhysicalUrls
(URL url) protected URL
getJBossPhysicalUrl
(URL url) Try to determine physical file location.protected boolean
isJBossUrl
(URL fileUrl) Check if given URL is pointing to JBoss 5 VFS resourcevoid
monitorFile
(URL fileUrl) Adds file to list of monitored filesConvert URLs to URLs with "file" protocolboolean
support()
Indicate if given implementation supports current OS File SystemMethods inherited from class org.apache.struts2.util.fs.DefaultFileManager
fileNeedsReloading, fileNeedsReloading, internal, isJarURL, loadFile, setReloadingConfigs
-
Constructor Details
-
JBossFileManager
public JBossFileManager()
-
-
Method Details
-
support
public boolean support()Description copied from interface:FileManager
Indicate if given implementation supports current OS File System- Specified by:
support
in interfaceFileManager
- Overrides:
support
in classDefaultFileManager
- Returns:
- true if supports current OS File System
-
monitorFile
Description copied from interface:FileManager
Adds file to list of monitored files- Specified by:
monitorFile
in interfaceFileManager
- Overrides:
monitorFile
in classDefaultFileManager
- Parameters:
fileUrl
-URL
to file to be monitored
-
normalizeToFileProtocol
Description copied from interface:FileManager
Convert URLs to URLs with "file" protocol- Specified by:
normalizeToFileProtocol
in interfaceFileManager
- Overrides:
normalizeToFileProtocol
in classDefaultFileManager
- Parameters:
url
- URL to convert to a jar url- Returns:
- a URL to a file, or null if the URL external form cannot be parsed
-
getAllPhysicalUrls
- Specified by:
getAllPhysicalUrls
in interfaceFileManager
- Overrides:
getAllPhysicalUrls
in classDefaultFileManager
- Throws:
IOException
-
isJBossUrl
Check if given URL is pointing to JBoss 5 VFS resource- Parameters:
fileUrl
- file URL to check- Returns:
- if given URL is pointing to JBoss 5 VFS resource
-
getJBossPhysicalUrl
Try to determine physical file location.- Parameters:
url
- JBoss VFS URL- Returns:
- URL pointing to physical file or original URL
- Throws:
IOException
- If conversion fails
-