Package org.apache.sis.storage.event
Class WarningEvent
java.lang.Object
java.util.EventObject
org.apache.sis.storage.event.StoreEvent
org.apache.sis.storage.event.WarningEvent
- All Implemented Interfaces:
Serializable
,Localized
Describes non-fatal errors that occurred in a resource or a data store.
The warning message is encapsulated in a
LogRecord
object, which allows the storage of various information
(stack trace, thread identifier,
log time, etc.) in addition of warning message.- Since:
- 1.0
- Version:
- 1.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final LogRecord
The warning message together with its severity level, source method/class name, stack trace, thread identifier, etc.private static final long
For cross-version compatibility.Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorsConstructorDescriptionWarningEvent
(Resource source, LogRecord description) Constructs an event for a warning that occurred in the given resource. -
Method Summary
Modifier and TypeMethodDescriptionReturns the warning message together with stack trace (if any) and other information.toString()
Returns a string representation of this warning for debugging purpose.Methods inherited from class org.apache.sis.storage.event.StoreEvent
consume, getLocale, getSource, isConsumed, isConsumedForParent
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDFor cross-version compatibility.- See Also:
-
description
The warning message together with its severity level, source method/class name, stack trace, thread identifier, etc.
-
-
Constructor Details
-
WarningEvent
Constructs an event for a warning that occurred in the given resource.- Parameters:
source
- the resource on which the warning initially occurred.description
- log record containing warning message, stack trace (if any) and other information.- Throws:
IllegalArgumentException
- if the given source is null.NullPointerException
- if the given description is null.
-
-
Method Details
-
getDescription
Returns the warning message together with stack trace (if any) and other information.- Returns:
- the log record containing warning message, stack trace and other information.
-
toString
Returns a string representation of this warning for debugging purpose.- Overrides:
toString
in classEventObject
- Returns:
- a string representation of this warning.
-