CollHostNameHelper.java
1.15 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
48
49
50
51
52
53
package com.sitech.ismp.coll.tivoli;
import java.util.ResourceBundle;
public class CollHostNameHelper {
private static ResourceBundle TivoliInfo = null;
static {
try{
TivoliInfo = ResourceBundle.getBundle("tivoli");
}
catch(Exception e){
System.out.println("Bundle tivoli.properties error.");
e.printStackTrace();
}
}
/*
public static String getHostName( String tivoli_hostname){
if(TivoliInfo==null){
System.out.println("no tivoli props init, original tivoli name is used for hostname");
return tivoli_hostname;
}
String sitech_host_name =null;
try{
sitech_host_name = (String)TivoliInfo.getString(tivoli_hostname);
}catch(Exception e){
System.out.println("error when get si-tech host name of tivoli host name:"+tivoli_hostname);
e.printStackTrace();
}
if(sitech_host_name==null){
System.out.println("no relate props with "+tivoli_hostname+"got , original tivoli name is used for hostname");
return tivoli_hostname;
}else{
return sitech_host_name;
}
}*/
/**
* @param args
*/
public static void main(String[] args) {
//
}
}