org.eclipse.rap.rwt.lifecycle.PhaseEvent Maven / Gradle / Ivy
/*******************************************************************************
* Copyright (c) 2002, 2013 Innoopract Informationssysteme GmbH and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Innoopract Informationssysteme GmbH - initial API and implementation
* EclipseSource - ongoing development
******************************************************************************/
package org.eclipse.rap.rwt.lifecycle;
import java.util.EventObject;
/**
* This event is sent to the PhaseListener
before and after
* a lifecycle phase is executed.
* The getSource()
method returns an instance of type
* ILifeCycle
.
* This class is not intended to be instantiated by clients.
*
* @since 2.0
* @noextend This class is not intended to be subclassed by clients.
*/
public class PhaseEvent extends EventObject {
private static final long serialVersionUID = 1L;
private final PhaseId phaseId;
/**
* Creates a PhaseEvent for the given lifecycle with the given
* phaseId
.
* @param source the lifecycle which causes this event
* @param phaseId the id of the phase that will be or was executed.
*/
@SuppressWarnings( "deprecation" )
public PhaseEvent( ILifeCycle source, PhaseId phaseId ) {
super( source );
this.phaseId = phaseId;
}
/**
* Returns the id of the phase that will be or was executed.
*
* @return the {@link PhaseId} of this event
*/
public PhaseId getPhaseId() {
return phaseId;
}
}