javax.faces.event.PreDestroyApplicationEvent Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jakarta.faces Show documentation
Show all versions of jakarta.faces Show documentation
EE4J Compatible Implementation for Jakarta Faces API
/*
* Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the
* Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
* version 2 with the GNU Classpath Exception, which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/
package javax.faces.event;
import javax.faces.application.Application;
import javax.faces.context.FacesContext;
/**
* This event must be published by the
* runtime before the factories associated with this {@link
* Application} are released.
*
* This event is useful for listeners that
* need to perform custom shutdown processing without having to rely on
* ServletContextListener
s which will be invoked after all
* of the application artifacts have been removed.
*
* @since 2.0
*/
public class PreDestroyApplicationEvent extends SystemEvent {
private static final long serialVersionUID = 8105212785161493162L;
/**
* Constructs a new
* PreDestroyApplicationEvent
for this application.
*
* @param application the application that has been configured
*
* @since 2.0
*/
public PreDestroyApplicationEvent(Application application) {
super(application);
}
/**
* Constructs a new
* PreDestroyApplicationEvent
for this application.
*
* @param facesContext the Faces context.
* @param application the application that has been configured
* @since 2.0
*/
public PreDestroyApplicationEvent(FacesContext facesContext, Application application) {
super(facesContext, application);
}
/**
* The source {@link Application} that sent this event.
*
* @return the application.
* @since 2.0
*/
public Application getApplication() {
return (Application) getSource();
}
}