KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > management > deploy > DeployThreadParams


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 package com.sun.enterprise.management.deploy;
24
25 import java.util.Collections JavaDoc;
26 import java.util.Map JavaDoc;
27 import java.util.HashMap JavaDoc;
28
29 import java.io.File JavaDoc;
30
31 import com.sun.appserv.management.deploy.DeploymentSource;
32 import com.sun.appserv.management.base.QueryMgr;
33 import com.sun.appserv.management.util.misc.TypeCast;
34
35
36 public final class DeployThreadParams
37 {
38     private final File JavaDoc mDeployFile;
39     private final File JavaDoc mPlanFile;
40     private final Map JavaDoc<String JavaDoc,Object JavaDoc> mOptions;
41     private final DeploymentSource mDeploymentSource;
42     private final DeploymentSource mDeploymentPlan;
43     private final QueryMgr mQueryMgr;
44     
45         private
46     DeployThreadParams(
47         final QueryMgr queryMgr,
48         final Map JavaDoc<String JavaDoc,?> options,
49         final File JavaDoc deployFile,
50         final File JavaDoc planFile,
51         final DeploymentSource source,
52         final DeploymentSource plan )
53     {
54         assert( (deployFile == null && source != null) ||
55             (deployFile != null && source == null) );
56         
57         mDeployFile = deployFile;
58         mPlanFile = planFile;
59         mOptions = options == null ?
60                 new HashMap JavaDoc<String JavaDoc,Object JavaDoc>() :
61                    Collections.unmodifiableMap(
62                     TypeCast.checkMap( options, String JavaDoc.class, Object JavaDoc.class));
63         mDeploymentSource = source;
64         mDeploymentPlan = plan;
65         mQueryMgr = queryMgr;
66     }
67     
68     
69         public
70     DeployThreadParams(
71         final QueryMgr queryMgr,
72         final Map JavaDoc<String JavaDoc,?> options,
73         final File JavaDoc deployFile,
74         final File JavaDoc planFile )
75     {
76         this( queryMgr, options, deployFile, planFile, null, null );
77     }
78     
79         public
80     DeployThreadParams(
81         final QueryMgr queryMgr,
82         final Map JavaDoc<String JavaDoc,?> options,
83         final DeploymentSource source,
84         final DeploymentSource plan )
85     {
86         this( queryMgr, options, null, null, source, plan );
87     }
88     
89     public File JavaDoc getDeployFile() { return( mDeployFile ); }
90     public File JavaDoc getPlanFile() { return( mPlanFile ); }
91     public Map JavaDoc<String JavaDoc,?> getOptions() { return( mOptions ); }
92     public QueryMgr getQueryMgr() { return( mQueryMgr ); }
93     public DeploymentSource getDeploymentSource() { return( mDeploymentSource ); }
94     public DeploymentSource getDeploymentPlan() { return( mDeploymentPlan ); }
95 }
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
Popular Tags