Package jakarta.faces.event
Class PreDestroyCustomScopeEvent
java.lang.Object
java.util.EventObject
jakarta.faces.event.SystemEvent
jakarta.faces.event.PreDestroyCustomScopeEvent
- All Implemented Interfaces:
Serializable
This class is provided to allow custom scopes to publish a "pre construct" event in the same way that other scopes do
to let the application become aware of the beginning of the scope. The runtime must listen for this event and invoke
any PreDestroy
annotated methods on any of the beans in this scope as appropriate. See the example code
on PostConstructCustomScopeEvent
for a usage example, replacing classes as appropriate to make sense for this
class.
- Since:
- 2.0
- See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorDescriptionPreDestroyCustomScopeEvent
(FacesContext facesContext, ScopeContext scopeContext) An instance of this event indicates that the custom scope enclosed within the argumentscopeContext
is about to end.PreDestroyCustomScopeEvent
(ScopeContext scopeContext) An instance of this event indicates that the custom scope enclosed within the argumentscopeContext
is about to end. -
Method Summary
Modifier and TypeMethodDescriptionReturn theScopeContext
for this event.Methods inherited from class jakarta.faces.event.SystemEvent
getFacesContext, isAppropriateListener, processListener
Methods inherited from class java.util.EventObject
getSource, toString
-
Constructor Details
-
PreDestroyCustomScopeEvent
An instance of this event indicates that the custom scope enclosed within the argument
scopeContext
is about to end.- Parameters:
scopeContext
- A structure that contains the name of the scope and the scope itself exposed as aMap<String, Object>
.
-
PreDestroyCustomScopeEvent
An instance of this event indicates that the custom scope enclosed within the argument
scopeContext
is about to end.- Parameters:
facesContext
- the Faces context.scopeContext
- A structure that contains the name of the scope and the scope itself exposed as aMap<String, Object>
.
-
-
Method Details
-
getContext
Return the
ScopeContext
for this event.- Returns:
- the scope context.
-