Class WebErrorEvent
- All Implemented Interfaces:
Serializable, Cloneable
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final EventType<WebErrorEvent> Common supertype for allWebErrorEventtypes.static final EventType<WebErrorEvent> This event occurs when aWebEnginedetects that its user data directory is already in use by aWebEnginerunning in a different VM.static final EventType<WebErrorEvent> This event occurs when aWebEngineencounters an I/O error while trying to create or access the user data directory.static final EventType<WebErrorEvent> This event occurs when aWebEngineencounters a security error while trying to create or access the user data directory.Fields declared in class Event
consumed, eventType, NULL_SOURCE_TARGET, targetModifier and TypeFieldDescriptionprotected booleanWhether this event has been consumed by any filter or handler.Type of the event.static final EventTargetThe constant which represents an unknown event source / target.protected EventTargetEvent target that defines the path through which the event will travel when posted.Fields declared in class EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionWebErrorEvent(Object source, EventType<WebErrorEvent> type, String message, Throwable exception) Creates a newWebErrorEvent. -
Method Summary
Modifier and TypeMethodDescriptionReturns the exception associated with this event.Returns the text message associated with this event.Methods declared in class Event
clone, consume, copyFor, fireEvent, getEventType, getTarget, isConsumedModifier and TypeMethodDescriptionclone()Creates and returns a copy of thisEvent.voidconsume()Marks thisEventas consumed.copyFor(Object newSource, EventTarget newTarget) Creates and returns a copy of this event with the specified event source and target.static voidfireEvent(EventTarget eventTarget, Event event) Fires the specified event.Gets the event type of this event.Returns the event target of this event.booleanIndicates whether thisEventhas been consumed by any filter or handler.Methods declared in class EventObject
getSource, toString
-
Field Details
-
ANY
Common supertype for allWebErrorEventtypes. -
USER_DATA_DIRECTORY_ALREADY_IN_USE
This event occurs when aWebEnginedetects that its user data directory is already in use by aWebEnginerunning in a different VM.In general, multiple
WebEngineinstances may share a single user data directory as long as they run in the same VM.WebEngineinstances running in different VMs are not allowed to share the same user data directory.When a
WebEngineis about to start loading a web page or executing a script for the first time, it checks whether itsuserDataDirectoryis already in use by aWebEnginerunning in a different VM. If the latter is the case, theWebEngineinvokes theWebEngine.onErrorevent handler, if any, with aUSER_DATA_DIRECTORY_ALREADY_IN_USEevent. If the invoked event handler modifies theuserDataDirectoryproperty, theWebEngineretries with the new user data directory as soon as the handler returns. If the handler does not modify theuserDataDirectoryproperty (which is the default), theWebEnginecontinues without the user data directory. -
USER_DATA_DIRECTORY_IO_ERROR
This event occurs when aWebEngineencounters an I/O error while trying to create or access the user data directory.When a
WebEngineis about to start loading a web page or executing a script for the first time, it checks whether it can create or access itsuserDataDirectory. If the check fails with an I/O error (such asjava.io.IOException), theWebEngineinvokes theWebEngine.onErrorevent handler, if any, with aUSER_DATA_DIRECTORY_IO_ERRORevent. If the invoked event handler modifies theuserDataDirectoryproperty, theWebEngineretries with the new user data directory as soon as the handler returns. If the handler does not modify theuserDataDirectoryproperty (which is the default), theWebEnginecontinues without the user data directory. -
USER_DATA_DIRECTORY_SECURITY_ERROR
This event occurs when aWebEngineencounters a security error while trying to create or access the user data directory.When a
WebEngineis about to start loading a web page or executing a script for the first time, it checks whether it can create or access itsuserDataDirectory. If the check fails with a security error (such asjava.lang.SecurityException), theWebEngineinvokes theWebEngine.onErrorevent handler, if any, with aUSER_DATA_DIRECTORY_SECURITY_ERRORevent. If the invoked event handler modifies theuserDataDirectoryproperty, theWebEngineretries with the new user data directory as soon as the handler returns. If the handler does not modify theuserDataDirectoryproperty (which is the default), theWebEnginecontinues without the user data directory.
-
-
Constructor Details
-
WebErrorEvent
public WebErrorEvent(Object source, EventType<WebErrorEvent> type, String message, Throwable exception) Creates a newWebErrorEvent.- Parameters:
source- the event source which sent the eventtype- the event typemessage- the text message associated with the event; may benullexception- the exception associated with the event; may benull
-
-
Method Details
-
getMessage
Returns the text message associated with this event.- Returns:
- the text message associated with this event, or
nullif there is no such message
-
getException
Returns the exception associated with this event.- Returns:
- the exception associated with this event, or
nullif there is no such exception
-