KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > appserv > management > deploy > DeploymentProgress


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 /*
25  * DeploymentProgress.java
26  *
27  * Created on April 8, 2004, 9:35 AM
28  */

29
30 package com.sun.appserv.management.deploy;
31
32 import java.util.Map JavaDoc;
33 import java.util.Locale JavaDoc;
34
35 import javax.management.openmbean.CompositeData JavaDoc;
36
37 import com.sun.appserv.management.base.MapCapable;
38
39
40
41 /**
42     Interface to provide deployment feedback while deployment
43     is executing in the server backend.
44
45     This interface may be instantiated by using routines in
46     {@link com.sun.appserv.management.deploy.DeploymentSupport}
47  */

48 public interface DeploymentProgress extends MapCapable
49 {
50     /**
51         Value of the MAP_CAPABLE_TYPE_KEY when turned into a Map.
52      */

53     public final static String JavaDoc DEPLOYMENT_PROGRESS_CLASS_NAME =
54             "com.sun.appserv.management.deploy.DeploymentProgress";
55
56
57     /**
58         Key for the progress percent as returned by getProgressPercent().
59      */

60     public static final String JavaDoc PROGRESS_PERCENT_KEY = "ProgressPercent";
61     
62     /**
63         Key for the Description as returned by getDescription().
64      */

65     public static final String JavaDoc DESCRIPTION_KEY = "Description";
66     
67     /**
68         Key prefix for the Description as returned by getDescription(). The key for
69         a given locale is LOCALIZED_DESCRIPTION_KEY_BASE + "_" + Locale.toString()
70      */

71     public static final String JavaDoc LOCALIZED_DESCRIPTION_KEY_BASE = "LocalizedDescription";
72
73     
74     /**
75      * @return the deployment progress number between 0 and
76      * 100 (deployment finished). This number is purely
77      * indicative and cannot be used to calculate actual
78      * remaining time
79      * @return number from 0 to 100 indicating status
80      */

81     public byte getProgressPercent();
82     
83     /**
84      * @return the last meaningful description of the current
85      * deployment operation
86      */

87     public String JavaDoc getDescription();
88     
89     /**
90      * @return the last meaningful localized description of
91      * the current deployment operation.
92      */

93     public String JavaDoc getLocalizedDescription(Locale JavaDoc locale);
94 }
95
Popular Tags