Package org.apache.commons.vfs2.provider
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.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes the provider.protected final VfsComponentContext
Returns the context for this provider.protected final org.apache.commons.logging.Log
Returns the logger for this file system to use.void
init()
Initializes the component.final void
setContext
(VfsComponentContext context) Sets the context for this file system provider.final void
setLogger
(org.apache.commons.logging.Log log) Sets the Logger to use for the component.
-
Constructor Details
-
AbstractVfsComponent
public AbstractVfsComponent()Constructs a new instance for subclasses.
-
-
Method Details
-
close
Closes the provider. This implementation does nothing.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceVfsComponent
-
getContext
Returns the context for this provider.- Returns:
- provider context
-
getLogger
Returns the logger for this file system to use.- Returns:
- logger for this file system
-
init
Initializes the component. This implementation does nothing.- Specified by:
init
in interfaceVfsComponent
- Throws:
FileSystemException
- if an error occurs.
-
setContext
Sets the context for this file system provider.- Specified by:
setContext
in interfaceVfsComponent
- Parameters:
context
- The VfsComponentContext.
-
setLogger
Sets the Logger to use for the component.- Specified by:
setLogger
in interfaceVfsComponent
- Parameters:
log
- The Log to use.
-