Package org.apache.commons.vfs2.impl
Class PrivilegedFileReplicator
java.lang.Object
org.apache.commons.vfs2.impl.PrivilegedFileReplicator
- All Implemented Interfaces:
- Closeable,- AutoCloseable,- FileReplicator,- VfsComponent
A file replicator that wraps another file replicator, performing the replication as a privileged action.
- 
Constructor SummaryConstructorsConstructorDescriptionPrivilegedFileReplicator(FileReplicator replicator) Constructs a new instance.
- 
Method SummaryModifier and TypeMethodDescriptionvoidclose()Closes the replicator.voidinit()Initializes the component.replicateFile(FileObject srcFile, FileSelector selector) Creates a local copy of the file, and all its descendants.voidsetContext(VfsComponentContext context) Sets the context for the replicator.voidsetLogger(org.apache.commons.logging.Log logger) Sets the Logger to use for the component.
- 
Constructor Details- 
PrivilegedFileReplicatorConstructs a new instance.- Parameters:
- replicator- The replicator.
 
 
- 
- 
Method Details- 
closeCloses the replicator.- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Specified by:
- closein interface- VfsComponent
 
- 
initInitializes the component.- Specified by:
- initin interface- VfsComponent
- Throws:
- FileSystemException- if an error occurs.
 
- 
replicateFileCreates a local copy of the file, and all its descendants.- Specified by:
- replicateFilein interface- FileReplicator
- Parameters:
- srcFile- The source FileObject.
- selector- The file selector.
- Returns:
- The replicated file.
- Throws:
- FileSystemException- if an error occurs.
 
- 
setContextSets the context for the replicator.- Specified by:
- setContextin interface- VfsComponent
- Parameters:
- context- The component context.
 
- 
setLoggerSets the Logger to use for the component.- Specified by:
- setLoggerin interface- VfsComponent
- Parameters:
- logger- The logger.
 
 
-