01: /*
02: * BEGIN_HEADER - DO NOT EDIT
03: *
04: * The contents of this file are subject to the terms
05: * of the Common Development and Distribution License
06: * (the "License"). You may not use this file except
07: * in compliance with the License.
08: *
09: * You can obtain a copy of the license at
10: * https://open-esb.dev.java.net/public/CDDLv1.0.html.
11: * See the License for the specific language governing
12: * permissions and limitations under the License.
13: *
14: * When distributing Covered Code, include this CDDL
15: * HEADER in each file and include the License file at
16: * https://open-esb.dev.java.net/public/CDDLv1.0.html.
17: * If applicable add the following below this CDDL HEADER,
18: * with the fields enclosed by brackets "[]" replaced with
19: * your own identifying information: Portions Copyright
20: * [year] [name of copyright owner]
21: */
22:
23: /*
24: * @(#)ComponentInstanceResult.java
25: * Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
26: *
27: * END_HEADER - DO NOT EDIT
28: */
29: /**
30: * MessageBuilder.java
31: *
32: * SUN PROPRIETARY/CONFIDENTIAL.
33: * This software is the proprietary information of Sun Microsystems, Inc.
34: * Use is subject to license terms.
35: *
36: * Created on August 23, 2006, 5:17 PM
37: */package com.sun.jbi.management.message;
38:
39: import java.util.List;
40: import java.util.Map;
41: import java.util.HashMap;
42:
43: /**
44: * Value object to hold the results of deploying a service unit to the component installed
45: * on various instances.
46: *
47: * For each component a map of instance name and the corresponding component task result
48: * is maintained, the map is keyed by instance name and the value is the component task
49: * result details for the component on that instance.
50: *
51: * @author Sun Microsystems, Inc.
52: */
53: public class ComponentInstanceResult {
54: // -- The name of the component
55: private String mComponentName;
56:
57: // -- The Map of [ instance | Task result details ]
58: private Map<String, TaskResultDetailsElement> mInstanceResults;
59:
60: /**
61: * Create a component instance result.
62: *
63: * @param compName - component name
64: * @param instRslt - map of intance names to the task result details
65: */
66: public ComponentInstanceResult(String compName,
67: Map<String, TaskResultDetailsElement> instRslt) {
68: mComponentName = compName;
69: mInstanceResults = instRslt;
70: }
71:
72: /**
73: * @return the instance results map for the component
74: */
75: public Map<String, TaskResultDetailsElement> getInstanceResults() {
76: if (mInstanceResults == null) {
77: mInstanceResults = new HashMap<String, TaskResultDetailsElement>();
78: }
79: return mInstanceResults;
80: }
81:
82: /**
83: * @return the component name
84: */
85: public String getComponentName() {
86: return mComponentName;
87: }
88:
89: }
|