|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface WarningProducer
Interface for objects that may produce warnings for recoverable failures. The warnings
are encapsulated in LogRecord objects and given to the warningOccurred method. The (sometime indirect) result of a call to warningOccurred
is one of the following choices:
If there is at least one listener (IIOReadWarningListener or
IIOWriteWarningListener) is reachable directly or indirectly, then
the logging message is given to those listeners.
Otherwise the record is logged using the LOGGER declared in this interface.
warningOccured method delegates its work to an other
WarningProducer until an ImageReader or ImageWriter is
found. For example the chain of delegations can be as below:
ReferencingBuilderMetadataNodeParser.warningOccurred(LogRecord)SpatialMetadata.warningOccurred(LogRecord)SpatialImageReader.warningOccurred(LogRecord)ImageReader.processWarningOccurred(String)IIOReadWarningListener.warningOccurred(ImageReader, String)
Localization
Warnings are localized for a locale typically inferred from
the image reader or writer. The locale can be specified by a call to the setLocale
method defined in the ImageReader or ImageWriter
class.
SpatialImageReader.warningOccurred(LogRecord),
SpatialImageWriter.warningOccurred(LogRecord),
SpatialMetadata.warningOccurred(LogRecord),
MetadataNodeParser.warningOccurred(LogRecord)
| coverage/geotk-coverageio (download) | View source code for this class |
| Field Summary | |
|---|---|
static Logger |
LOGGER
The logger to use as a fallback when no warning listener can be reach. |
| Method Summary | |
|---|---|
boolean |
warningOccurred(LogRecord record)
Invoked when a warning occurred. |
| Methods inherited from interface Localized |
|---|
getLocale |
| Field Detail |
|---|
static final Logger LOGGER
| Method Detail |
|---|
boolean warningOccurred(LogRecord record)
WarningProducer interface. However it can also be invoked by other classes that
forward their warnings, like below:
This method is public for allowing such forwarding.ReferencingBuilder→MetadataNodeParser→SpatialMetadata→ (SpatialImageReaderorSpatialImageWriter)
record - The warning that occurred.
true if the message has been sent to at least one warning listener,
or false if it has been sent to the logging system as a fallback.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||