|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ConfigurationReader
An interface through which modules can read back their XML configuration
data. This interface is defined in a manner similar to SAX ContentHandler
objects (as a SAX reader will be calling these entities).
A valid Bundle configuration file always has the following form:
<Bundle name="%BUNDLE_NAME%">
%CONFIGURATION_BLOCK%
</Bundle>
%BUNDLE_NAME% must match the bundle's OSGi
Bundle-Name attribute specified in the bundle manifest.
%CONFIGURATION_BLOCK% may be any valid module-specific
XML data use for configuration purposes, subject to the following
restrictions:
org.xml.sax.ContentHandler| Method Summary | |
|---|---|
void |
endElement(java.lang.String element)
Indicates that an element has ended. |
void |
processData(char[] data)
Indicates that data is available in the current element. |
void |
startElement(java.lang.String element,
java.util.Map<java.lang.String,java.lang.String> attributes)
Indicates that a new element has started with the specified name and optional attributes |
| Method Detail |
|---|
void startElement(java.lang.String element,
java.util.Map<java.lang.String,java.lang.String> attributes)
throws java.io.IOException
element - The name of the element that is startingattributes - A list of attributes, mapped from their name
to their value, specified during the element start tag
java.io.IOException - If a parsing error occurs
void endElement(java.lang.String element)
throws java.io.IOException
Bundle element, this indicates the last tag that
this reader will receive. If any information was not received, the
bundle should attempt to load defaults if it has not already. If
this was received immediately after the Bundle start
tag, it may indicate that the configuration data for this bundle
was discarded due to errors (and thus the bundle should attempt
to load defaults).
element - The name of the element that ended
java.io.IOException - If a parsing error occurs
void processData(char[] data)
throws java.io.IOException
Indicates that data is available in the current element. It cannot be guaranteed that all of the data will arrive all at once for an element -- consecutive calls to processData indicate data which should be concatenated together. Likewise, it cannot be guaranteed that data will always arrive one character at a time, even if it tends to do so.
Ignorable whitespace (per the XML specification) may or may not be reported by this method. This behavior is dependent upon the backend parser being used, which will be user- and implementation- dependent.
data - The block of available data
java.io.IOException - If a parsing error occurs
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||