S
- The base type of objects that emit warnings (the source).public interface WarningListener<S> extends EventListener
DataStore
or other SIS objects.
Warnings are encapsulated in LogRecord
objects and logged at Level.WARNING
if the emitter does not
have any registered any WarningListener
. This listener allows applications to intercept warning records for:
Handler
is
that listeners allow to handle the warnings on a per-DataStore
(or any other emitter) instance.WarningListeners
,
DataStore.addWarningListener(WarningListener)
Defined in the sis-utility module
Modifier and Type | Method and Description |
---|---|
Class<S> |
getSourceClass()
Returns the type of objects that emit warnings of interest for this listener.
|
void |
warningOccured(S source,
LogRecord warning)
Reports the occurrence of a non-fatal error.
|
Class<S> getSourceClass()
LogRecord.getSourceClassName()
, or one of its parent classes.void warningOccured(S source, LogRecord warning)
DataStore
in the midst of a reading process)
will continue following the call to this method.
The LogRecord
provides the warning message together with
programmatic information like the source class name and
method name where the warning occurred. The log record
may optionally contains the exception which has been thrown.
Applications may choose to ignore the warning, display a dialog or take any other action they choose. Applications do not need to log the warning, since logging will be done automatically if the emitter has no registered warning listeners.
source
- The object that emitted a warning.warning
- The warning message together with programmatic information.Copyright © 2010–2013 The Apache Software Foundation. All rights reserved.