Package org.apache.commons.vfs2.provider
Class AbstractVfsComponent
- java.lang.Object
-
- org.apache.commons.vfs2.provider.AbstractVfsComponent
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,VfsComponent
- Direct Known Subclasses:
AbstractFilesCache,AbstractFileSystem,AbstractVfsContainer,DefaultFileReplicator
public abstract class AbstractVfsComponent extends java.lang.Object implements VfsComponent
A partialVfsComponentimplementation.
-
-
Constructor Summary
Constructors Constructor Description AbstractVfsComponent()Constructs a new instance for subclasses.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes the provider.protected VfsComponentContextgetContext()Returns the context for this provider.protected org.apache.commons.logging.LoggetLogger()Returns the logger for this file system to use.voidinit()Initializes the component.voidsetContext(VfsComponentContext context)Sets the context for this file system provider.voidsetLogger(org.apache.commons.logging.Log log)Sets the Logger to use for the component.
-
-
-
Constructor Detail
-
AbstractVfsComponent
public AbstractVfsComponent()
Constructs a new instance for subclasses.
-
-
Method Detail
-
close
public void close()
Closes the provider. This implementation does nothing.- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Specified by:
closein interfaceVfsComponent
-
getContext
protected final VfsComponentContext getContext()
Returns the context for this provider.- Returns:
- provider context
-
getLogger
protected final org.apache.commons.logging.Log getLogger()
Returns the logger for this file system to use.- Returns:
- logger for this file system
-
init
public void init() throws FileSystemException
Initializes the component. This implementation does nothing.- Specified by:
initin interfaceVfsComponent- Throws:
FileSystemException- if an error occurs.
-
setContext
public final void setContext(VfsComponentContext context)
Sets the context for this file system provider.- Specified by:
setContextin interfaceVfsComponent- Parameters:
context- The VfsComponentContext.
-
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.
-
-