1 21 22 package org.opensubsystems.core.application; 23 24 import org.opensubsystems.core.error.OSSException; 25 import org.opensubsystems.core.util.NetUtils; 26 27 40 public class ServerId 41 { 42 44 47 protected String m_strServerId; 48 49 52 protected static ServerId s_defaultServerId; 53 54 56 59 static 60 { 61 try 62 { 63 s_defaultServerId = new ServerId(); 65 } 66 catch (OSSException bfeExc) 67 { 68 throw new RuntimeException (bfeExc); 70 } 71 } 72 73 78 public ServerId( 79 ) throws OSSException 80 { 81 m_strServerId = NetUtils.getServerIPAddressAndName(); 84 } 85 86 91 public static ServerId getInstance( 92 ) 93 { 94 return s_defaultServerId; 95 } 96 97 102 public String getServerId( 103 ) 104 { 105 return m_strServerId; 106 } 107 108 113 public void setServerId( 114 String serverId 115 ) 116 { 117 m_strServerId = serverId; 118 } 119 } 120 | Popular Tags |