Class AbstractVfsComponent
java.lang.Object
org.apache.commons.vfs2.provider.AbstractVfsComponent
- All Implemented Interfaces:
Closeable, AutoCloseable, VfsComponent
- Direct Known Subclasses:
AbstractFilesCache, AbstractFileSystem, AbstractVfsContainer, DefaultFileReplicator
A partial
VfsComponent implementation.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate VfsComponentContextprivate org.apache.commons.logging.Log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the provider.protected final VfsComponentContextReturns the context for this provider.protected final org.apache.commons.logging.LogReturns the logger for this file system to use.voidinit()Initializes the component.final voidsetContext(VfsComponentContext context) Sets the context for this file system provider.final voidsetLogger(org.apache.commons.logging.Log log) Sets the Logger to use for the component.
-
Field Details
-
context
-
log
private org.apache.commons.logging.Log log
-
-
Constructor Details
-
AbstractVfsComponent
public AbstractVfsComponent()
-
-
Method Details
-
setLogger
public final void setLogger(org.apache.commons.logging.Log log) Sets the Logger to use for the component.- Specified by:
setLoggerin interfaceVfsComponent- Parameters:
log- The Log to use.
-
setContext
Sets the context for this file system provider.- Specified by:
setContextin interfaceVfsComponent- Parameters:
context- The VfsComponentContext.
-
init
Initializes the component. This implementation does nothing.- Specified by:
initin interfaceVfsComponent- Throws:
FileSystemException- if an error occurs.
-
close
public void close()Closes the provider. This implementation does nothing.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceVfsComponent
-
getLogger
protected final org.apache.commons.logging.Log getLogger()Returns the logger for this file system to use.- Returns:
- logger for this file system
-
getContext
Returns the context for this provider.- Returns:
- provider context
-