KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > enterprise > deploy > spi > status > ProgressEvent


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23
24 package javax.enterprise.deploy.spi.status;
25
26 import javax.enterprise.deploy.spi.TargetModuleID JavaDoc;
27 import java.util.EventObject JavaDoc;
28
29 /**
30  * An event which indicates that a deployment
31  * status change has occurred.
32  *
33  * @see ProgressListener
34  * @see ProgressObject
35  */

36 public class ProgressEvent extends EventObject JavaDoc
37 {
38    private DeploymentStatus JavaDoc statuscode;
39    private TargetModuleID JavaDoc targetModuleID;
40
41    /**
42     * Creates a new object representing a deployment
43     * progress event.
44     *
45     * @param source the object on which the Event initially occurred.
46     * @param sCode the object containing the status
47     * information.
48     */

49    public ProgressEvent (Object JavaDoc source, TargetModuleID JavaDoc targetModuleID,
50              DeploymentStatus JavaDoc sCode)
51    {
52       super(source);
53       this.statuscode = sCode;
54       this.targetModuleID = targetModuleID;
55    }
56
57    /**
58     * Retrieve the TargetModuleID for this event
59     *
60     * @return the object containing the TargetModuleID
61     */

62    public TargetModuleID JavaDoc getTargetModuleID()
63    {
64      return targetModuleID;
65    }
66
67    /**
68     * Retrieve the status information.
69     *
70     * @return the object containing the status information.
71     */

72    public DeploymentStatus JavaDoc getDeploymentStatus()
73    {
74       return statuscode;
75    }
76 }
77
Popular Tags