KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > tools > upgrade > cluster > IIOPCluster


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  * IIOPCluster.java
26  *
27  * Created on June 13, 2004, 12:02 AM
28  */

29
30 package com.sun.enterprise.tools.upgrade.cluster;
31
32 /**
33  *
34  * @author prakash
35  */

36 import java.util.*;
37 public class IIOPCluster {
38     
39     // This clusterName is not really an attribute of IIOCluster element. This is the name obtained from current cluster from common info model
40
private String JavaDoc clusterName;
41     private List iiopServerInstanceList;
42     private IIOPServerInstance currentServerInstance;
43     
44     /** Creates a new instance of IIOPCluster */
45     public IIOPCluster(String JavaDoc clName) {
46         this.clusterName = clName;
47     }
48     public void addIIOPServerInstance(String JavaDoc serverName){
49         IIOPServerInstance serverInstance = new IIOPServerInstance(serverName);
50         this.currentServerInstance = serverInstance;
51         if(this.iiopServerInstanceList == null)
52             this.iiopServerInstanceList = new ArrayList();
53         this.iiopServerInstanceList.add(serverInstance);
54     }
55     public void addIIOPEndPoint(String JavaDoc id, String JavaDoc host, String JavaDoc port){
56         this.currentServerInstance.addIIOPEndPoint(id,host,port);
57     }
58     public List getIIOPServerInstanceList(){
59         return this.iiopServerInstanceList;
60     }
61     public String JavaDoc getClusterName(){
62         return this.clusterName;
63     }
64     public void setClusterName(String JavaDoc clName){
65         this.clusterName = clName;
66     }
67 }
68
Popular Tags