public static class DocumentCache.Event extends Object implements Cloneable
DocumentCache.Listener
Modifier and Type | Field and Description |
---|---|
DocumentCache |
documentCache
The document cache which has reported this event.
|
Constructor and Description |
---|
Event(DocumentCache documentCache)
Constructs an empty document cache event.
|
Modifier and Type | Method and Description |
---|---|
DocumentCache.Event |
copy()
Returns a shallow copy of this event.
|
Document |
getDocument()
Returns the loaded document.
|
DocumentCache.Entry |
getEntry()
Returns the cache entry involved in this event.
|
String |
getIOError()
Returns the I/O error which has caused the load failure.
|
List<LoadError> |
getLoadErrors()
Returns the list of errors which have been reported by the loader
while loading the document.
|
List<LoadError> |
getLoadWarnings()
Returns the list of warnings which have been reported by the loader
while loading the document.
|
String |
getMessage()
Returns a localized message representing this event.
|
DocumentCache.EventType |
getType()
Returns the type of this event.
|
URL |
getURL()
Returns the URL of the document involved in this event.
|
void |
log(Log log)
Log this event to specified log.
|
String |
toString()
Returns a string representation of this entry which is suitable
for debugging and testing.
|
public final DocumentCache documentCache
public Event(DocumentCache documentCache)
public DocumentCache.Event copy()
public DocumentCache.EventType getType()
This information is available for all event types.
public URL getURL()
null
.
This information is available for all event types.
public DocumentCache.Entry getEntry()
null
.
This information is available for all event types except
DocumentCache.EventType.LOADED_DOCUMENT
.
public Document getDocument()
null
if loading
the document has failed.
This information is available only for the
DocumentCache.EventType.LOADED_DOCUMENT
event type.
getIOError()
,
getLoadErrors()
,
getLoadWarnings()
public String getIOError()
null
.
This information is available only for the
DocumentCache.EventType.LOADED_DOCUMENT
event type.
getDocument()
,
getLoadErrors()
,
getLoadWarnings()
public List<LoadError> getLoadErrors()
This information is available only for the
DocumentCache.EventType.LOADED_DOCUMENT
event type.
getDocument()
,
getIOError()
,
getLoadWarnings()
public List<LoadError> getLoadWarnings()
This information is available only for the
DocumentCache.EventType.LOADED_DOCUMENT
event type.
getDocument()
,
getIOError()
,
getLoadErrors()
public String toString()
public void log(Log log)
getMessage()
.public String getMessage()