UaHostHelper.java
1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package com.sitech.ismp.coll.tivoli;
import java.util.ResourceBundle;
public class UaHostHelper
{
static ResourceBundle UA_HOST_NAME = null;
static {
try{
UA_HOST_NAME = ResourceBundle.getBundle("ua_host_name");
}
catch(Exception e){
System.out.println("Bundle ua_host_name.properties error.");
e.printStackTrace();
}
}
/**
* 返回ha host name
* lianlian 2006-09-22
* @param host_name
* @return
*/
public static String getUaHostName(String host_name)
{
String temp_ua_host_name="";
if(host_name==null)
{
return temp_ua_host_name;
}
Object obj = UA_HOST_NAME.getObject(host_name + "_UA");
if(obj==null)
{
return temp_ua_host_name;
}
else
{
temp_ua_host_name = (String)obj;
return temp_ua_host_name;
}
}
}