Package org.apache.tomcat.util.file
Interface ConfigurationSource
- All Known Implementing Classes:
- CatalinaBaseConfigurationSource
public interface ConfigurationSource
Abstracts configuration file storage. Allows Tomcat embedding using the regular
 configuration style.
 This abstraction aims to be very simple and does not cover resource listing,
 which is usually used for dynamic deployments that are usually not used when
 embedding, as well as resource writing.
- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic classRepresents a resource: a stream to the resource associated with its URI.
- 
Field SummaryFields
- 
Method SummaryModifier and TypeMethodDescriptiondefault ConfigurationSource.ResourcegetConfResource(String name) Get a resource, based on the conf path.getResource(String name) Get a resource, not based on the conf path.default ConfigurationSource.ResourceReturns the contents of the main conf/server.xml file.default ConfigurationSource.ResourceReturns the contents of the shared conf/web.xml file.Get a URI to the given resource.
- 
Field Details- 
DEFAULT
 
- 
- 
Method Details- 
getServerXmlReturns the contents of the main conf/server.xml file.- Returns:
- the server.xml as an InputStream
- Throws:
- IOException- if an error occurs or if the resource does not exist
 
- 
getConfResourceGet a resource, based on the conf path.- Parameters:
- name- The resource name
- Returns:
- the resource as an InputStream
- Throws:
- IOException- if an error occurs or if the resource does not exist
 
- 
getResourceGet a resource, not based on the conf path.- Parameters:
- name- The resource name
- Returns:
- the resource
- Throws:
- IOException- if an error occurs or if the resource does not exist
 
- 
getURIGet a URI to the given resource. Unlike getResource, this will also return URIs to locations where no resource exists.- Parameters:
- name- The resource name
- Returns:
- a URI representing the resource location
 
 
-