Top Description Fields Constructors Methods
jakarta.faces.event

public Class PreDestroyCustomScopeEvent

extends SystemEvent
Class Inheritance
Annotations
@Deprecated
since:4.1
forRemoval:true
Imports
jakarta.faces.context.FacesContext

Deprecated

for removal since 4.1.

because CustomScope has been removed from Faces in favor of CDI.

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

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
public
PreDestroyCustomScopeEvent(ScopeContext
A structure that contains the name of the scope and the scope itself exposed as a Map<String, Object>.
scopeContext
)

An instance of this event indicates that the custom scope enclosed within the argument scopeContext is about to end.

public
PreDestroyCustomScopeEvent(FacesContext
the Faces context.
facesContext
,
ScopeContext
A structure that contains the name of the scope and the scope itself exposed as a Map<String, Object>.
scopeContext
)

An instance of this event indicates that the custom scope enclosed within the argument scopeContext is about to end.

Method Summary

Modifier and TypeMethod and Description
public ScopeContext

Returns:

the scope context.
getContext
()

Return the ScopeContext for this event.

Inherited from jakarta.faces.event.SystemEvent:
getFacesContextisAppropriateListenerprocessListener

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides jakarta.faces.event.SystemEvent.serialVersionUID.

Constructor Detail

PreDestroyCustomScopeEventback to summary
public PreDestroyCustomScopeEvent(ScopeContext scopeContext)

An instance of this event indicates that the custom scope enclosed within the argument scopeContext is about to end.

Parameters
scopeContext:ScopeContext

A structure that contains the name of the scope and the scope itself exposed as a Map<String, Object>.

PreDestroyCustomScopeEventback to summary
public PreDestroyCustomScopeEvent(FacesContext facesContext, ScopeContext scopeContext)

An instance of this event indicates that the custom scope enclosed within the argument scopeContext is about to end.

Parameters
facesContext:FacesContext

the Faces context.

scopeContext:ScopeContext

A structure that contains the name of the scope and the scope itself exposed as a Map<String, Object>.

Method Detail

getContextback to summary
public ScopeContext getContext()

Return the ScopeContext for this event.

Returns:ScopeContext

the scope context.