1 17 18 package org.sape.carbon.services.clustering; 19 20 import java.io.Serializable ; 21 import java.net.InetAddress ; 22 23 32 public class CarbonUserMessage implements Serializable { 33 34 private String userName = 35 System.getProperty("user.name"); 36 private String osName = 37 System.getProperty("os.name"); 38 private String osVersion = 39 System.getProperty("os.version"); 40 41 private String javaVendor = 42 System.getProperty("java.vendor"); 43 private String javaVersion = 44 System.getProperty("java.version"); 45 private int key = 46 System.identityHashCode(Runtime.getRuntime()); 47 48 private InetAddress localHost; 49 50 public CarbonUserMessage() { 51 try { 52 this.localHost = InetAddress.getLocalHost(); 53 } catch (Exception e) { 54 e.printStackTrace(); 55 } 56 } 57 58 public String toString() { 59 return 60 "Carbon User: " + this.userName + "@" + this.localHost + "\n" + 61 "\tOperating System: " + this.osName + "[" + this.osVersion + "]\n" + 62 "\tJava: " + this.javaVendor + "[" + this.javaVersion + "]\n" + 63 "\tSystemKey: " + this.key; 64 } 65 } 66 | Popular Tags |