org.apache.commons.transaction.file
Class FileResourceManager
java.lang.Object
org.apache.commons.transaction.file.FileResourceManager
- All Implemented Interfaces:
- ResourceManager<FileResourceManager.FileResource>
public class FileResourceManager
- extends Object
- implements ResourceManager<FileResourceManager.FileResource>
Default file system implementation of a
resource manager.
Only two properties are
supported for reading: "lastModified" and "length" . None are supported for
setting or
removing.
This implementation is NOT thread-safe. Use
TxFileResourceManager if you require a thread-safe
implementation.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
rootPath
protected String rootPath
FileResourceManager
public FileResourceManager(String rootPath)
getResource
public FileResourceManager.FileResource getResource(String path)
throws ResourceException
- Description copied from interface:
ResourceManager
- Gets the resource denoted by the path
- Specified by:
getResource in interface ResourceManager<FileResourceManager.FileResource>
- Parameters:
path - the path of the resource
- Returns:
- the resource denoted by the path
- Throws:
ResourceException - in case anything goes fatally wrong
getRootPath
public String getRootPath()
- Description copied from interface:
ResourceManager
- Gets the root path of this manager.
- Specified by:
getRootPath in interface ResourceManager<FileResourceManager.FileResource>
- Returns:
- the root path or
null if no applicable
Copyright © 2004-2007 The Apache Software Foundation. All Rights Reserved.