|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ConfigResource
A single configuration resource for a node. This is typically a
Resource such as a .properties or .xml
file, but it could
be a portion of a larger resource, or data stored in some custom fashion.
A ConfigResource is responsible for understanding the basic syntax
of a particular file type, but it does not define the final semantics of
the content. That responsibility falls to a ConfigEvaluator
(specifically, the one returned by getEvaluator(NodeReference).
This decoupling allows one file type to support many different semantic
interpretations, including different versions of a single syntax.
For example, some part of the file could specify what configuration
language it supports.
Implementations must be thread-safe.
| Method Summary | |
|---|---|
ConfigEvaluator |
getEvaluator(NodeReference location)
Returns the evaluator being used by this resource. |
String |
getIdentifier()
Returns a string identifying this resource, for use in messages. |
Resource |
getResource()
Gets the underlying resource from which this configuration is loaded. |
void |
writeConfiguration(Writer out)
Prints the content of this resource to a stream. |
| Method Detail |
|---|
Resource getResource()
String getIdentifier()
ConfigEvaluator getEvaluator(NodeReference location)
throws ConfigurationException
location - identifies the node being configured.
null.
ConfigurationException - if no evaluator could be located.
void writeConfiguration(Writer out)
throws IOException
out - the stream to get the configuration content.
NullPointerException - if out is null.
IOException - if it's thrown by out.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||