Top Description Fields Constructors Methods
jakarta.faces.event

public abstract Class SystemEvent

extends EventObject
Class Inheritance
Known Direct Subclasses
jakarta.faces.event.PostPutFlashValueEvent, jakarta.faces.event.PostConstructCustomScopeEvent, jakarta.faces.event.PostKeepFlashValueEvent, jakarta.faces.event.PreDestroyApplicationEvent, jakarta.faces.event.PreDestroyCustomScopeEvent, jakarta.faces.event.PostConstructApplicationEvent, jakarta.faces.event.PreRemoveFlashValueEvent, jakarta.faces.event.PreClearFlashEvent, jakarta.faces.event.ExceptionQueuedEvent, jakarta.faces.event.ComponentSystemEvent
Imports
java.util.EventObject, jakarta.faces.context.FacesContext

SystemEvent is the base class for non-application specific events that can be fired by arbitrary objects.

Since
2.0

Field Summary

Modifier and TypeField and Description
private transient FacesContext
facesContext

Stores the Faces context.

private static final long
Inherited from java.util.EventObject:
source

Constructor Summary

AccessConstructor and Description
public
SystemEvent(Object
the source reference to be passed to the superclass constructor.
source
)

Pass the argument source to the superclass constructor.

public
SystemEvent(FacesContext
the Faces context.
facesContext
,
Object
the source reference to be passed to the superclass constructor.
source
)

Pass the argument source to the superclass constructor.

Method Summary

Modifier and TypeMethod and Description
public FacesContext

Returns:

the Faces context.
getFacesContext
()

Get the Faces context.

public boolean

Returns:

the result as specified above
isAppropriateListener
(FacesListener
FacesListener to evaluate
listener
)

Return true if this FacesListener is an instance of a the appropriate listener class that this event supports.

public void
processListener(FacesListener
FacesListener to send this FacesEvent to
listener
)

Broadcast this event instance to the specified FacesListener, by whatever mechanism is appropriate.

Inherited from java.util.EventObject:
getSourcetoString

Field Detail

facesContextback to summary
private transient FacesContext facesContext

Stores the Faces context.

serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.util.EventObject.serialVersionUID.

Constructor Detail

SystemEventback to summary
public SystemEvent(Object source)

Pass the argument source to the superclass constructor.

Parameters
source:Object

the source reference to be passed to the superclass constructor.

Exceptions
IllegalArgumentException:
if the argument is null.
SystemEventback to summary
public SystemEvent(FacesContext facesContext, Object source)

Pass the argument source to the superclass constructor.

Parameters
facesContext:FacesContext

the Faces context.

source:Object

the source reference to be passed to the superclass constructor.

Exceptions
IllegalArgumentException:
if the argument is null.

Method Detail

getFacesContextback to summary
public FacesContext getFacesContext()

Get the Faces context.

If the constructor was passed a FacesContext we return it, otherwise we call FacesContext.getCurrentInstance() and return it.

Returns:FacesContext

the Faces context.

Since
2.3
isAppropriateListenerback to summary
public boolean isAppropriateListener(FacesListener listener)

Return true if this FacesListener is an instance of a the appropriate listener class that this event supports. The default implementation returns true if the listener is a ComponentSystemEventListener.

Parameters
listener:FacesListener

FacesListener to evaluate

Returns:boolean

the result as specified above

processListenerback to summary
public void processListener(FacesListener listener)

Broadcast this event instance to the specified FacesListener, by whatever mechanism is appropriate. Typically, this will be accomplished by calling an event processing method, and passing this instance as a parameter.

Parameters
listener:FacesListener

FacesListener to send this FacesEvent to

Exceptions
AbortProcessingException:
Signal the Jakarta Faces implementation that no further processing on the current event should be performed