Package org.apache.commons.vfs2.provider
Class AbstractVfsContainer
java.lang.Object
org.apache.commons.vfs2.provider.AbstractVfsComponent
org.apache.commons.vfs2.provider.AbstractVfsContainer
- All Implemented Interfaces:
- Closeable,- AutoCloseable,- VfsComponent
- Direct Known Subclasses:
- AbstractFileProvider,- VirtualFileProvider
A 
VfsComponent that contains a set of subcomponents.- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidaddComponent(Object component) Adds a subcomponent to this component.voidclose()Closes the subcomponents of this component.protected voidremoveComponent(Object component) Removes a subcomponent from this component.Methods inherited from class org.apache.commons.vfs2.provider.AbstractVfsComponentgetContext, getLogger, init, setContext, setLogger
- 
Constructor Details- 
AbstractVfsContainerpublic AbstractVfsContainer()Constructs a new instance for subclasses.
 
- 
- 
Method Details- 
addComponentAdds a subcomponent to this component.If the sub-component implements VfsComponent, it is initialized. All sub-components are closed when this component is closed.- Parameters:
- component- the component to add.
- Throws:
- FileSystemException- if any error occurs.
 
- 
closeCloses the subcomponents of this component.- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Specified by:
- closein interface- VfsComponent
- Overrides:
- closein class- AbstractVfsComponent
 
- 
removeComponentRemoves a subcomponent from this component.- Parameters:
- component- the component to remove.
 
 
-