Source Code Cross Referenced for ServerData.java in  » ESB » wso2-esb » org » wso2 » esb » services » tos » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » ESB » wso2 esb » org.wso2.esb.services.tos 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package org.wso2.esb.services.tos;
002:
003:        import org.wso2.esb.ServiceBusConfiguration;
004:
005:        /**
006:         * Compute and Hold detailed server information
007:         */
008:        public class ServerData {
009:
010:            private String javaRuntimeName;
011:            private String javaVMVersion;
012:            private String javaVMVendor;
013:            private String javaHome;
014:            private String javaVersion;
015:            private String osName;
016:            private String osVersion;
017:            private String userHome;
018:            private String userTimezone;
019:            private String userName;
020:            private String userCountry;
021:            private String axis2Location;
022:            private String serverName;
023:            private String repoLocation;
024:            private String wso2esbVersion;
025:
026:            public ServerData(String serverName, String repoLocation) {
027:                init();
028:                this .serverName = serverName;
029:                this .repoLocation = repoLocation;
030:            }
031:
032:            public ServerData() {
033:                init();
034:            }
035:
036:            private void init() {
037:                javaRuntimeName = System.getProperty("java.runtime.name");
038:                javaVMVersion = System.getProperty("java.vm.version");
039:                javaVMVendor = System.getProperty("java.vm.vendor");
040:                userCountry = System.getProperty("user.country");
041:                osName = System.getProperty("os.name");
042:                osVersion = System.getProperty("os.version");
043:                userHome = System.getProperty("user.home");
044:                userTimezone = System.getProperty("user.timezone");
045:                userName = System.getProperty("user.name");
046:                javaHome = System.getProperty("java.home");
047:                javaVersion = System.getProperty("java.version");
048:                wso2esbVersion = ServiceBusConfiguration.getInstance()
049:                        .getFirstProperty("Version");
050:                axis2Location = axis2Location();
051:            }
052:
053:            private String axis2Location() {
054:                try {
055:                    Class clazz = Class
056:                            .forName("org.apache.axis2.engine.AxisEngine");
057:                    java.net.URL url = clazz.getProtectionDomain()
058:                            .getCodeSource().getLocation();
059:                    String location = url.toString();
060:
061:                    if (location.startsWith("jar")) {
062:                        url = ((java.net.JarURLConnection) url.openConnection())
063:                                .getJarFileURL();
064:                        location = url.toString();
065:                    }
066:
067:                    if (location.startsWith("file")) {
068:                        java.io.File file = new java.io.File(url.getFile());
069:                        return file.getAbsolutePath();
070:
071:                    } else {
072:                        return url.toString();
073:                    }
074:
075:                } catch (Throwable t) {
076:                    return "An error occured while trying to determine Axis2 location";
077:                }
078:            }
079:
080:            public String getJavaRuntimeName() {
081:                return javaRuntimeName;
082:            }
083:
084:            public void setJavaRuntimeName(String javaRuntimeName) {
085:                this .javaRuntimeName = javaRuntimeName;
086:            }
087:
088:            public String getJavaVMVersion() {
089:                return javaVMVersion;
090:            }
091:
092:            public void setJavaVMVersion(String javaVMVersion) {
093:                this .javaVMVersion = javaVMVersion;
094:            }
095:
096:            public String getUserCountry() {
097:                return userCountry;
098:            }
099:
100:            public void setUserCountry(String userCountry) {
101:                this .userCountry = userCountry;
102:            }
103:
104:            public String getJavaVMVendor() {
105:                return javaVMVendor;
106:            }
107:
108:            public void setJavaVMVendor(String javaVMVendor) {
109:                this .javaVMVendor = javaVMVendor;
110:            }
111:
112:            public String getOsName() {
113:                return osName;
114:            }
115:
116:            public void setOsName(String osName) {
117:                this .osName = osName;
118:            }
119:
120:            public String getOsVersion() {
121:                return osVersion;
122:            }
123:
124:            public void setOsVersion(String osVersion) {
125:                this .osVersion = osVersion;
126:            }
127:
128:            public String getUserHome() {
129:                return userHome;
130:            }
131:
132:            public void setUserHome(String userHome) {
133:                this .userHome = userHome;
134:            }
135:
136:            public String getUserName() {
137:                return userName;
138:            }
139:
140:            public void setUserName(String userName) {
141:                this .userName = userName;
142:            }
143:
144:            public String getUserTimezone() {
145:                return userTimezone;
146:            }
147:
148:            public void setUserTimezone(String userTimezone) {
149:                this .userTimezone = userTimezone;
150:            }
151:
152:            public String getJavaHome() {
153:                return javaHome;
154:            }
155:
156:            public void setJavaHome(String javaHome) {
157:                this .javaHome = javaHome;
158:            }
159:
160:            public String getJavaVersion() {
161:                return javaVersion;
162:            }
163:
164:            public void setJavaVersion(String javaVersion) {
165:                this .javaVersion = javaVersion;
166:            }
167:
168:            public String getAxis2Location() {
169:                return axis2Location;
170:            }
171:
172:            public void setAxis2Location(String axis2Location) {
173:                this .axis2Location = axis2Location;
174:            }
175:
176:            public String getServerName() {
177:                return serverName;
178:            }
179:
180:            public void setServerName(String serverName) {
181:                this .serverName = serverName;
182:            }
183:
184:            public String getRepoLocation() {
185:                return repoLocation;
186:            }
187:
188:            public void setRepoLocation(String repoLocation) {
189:                this .repoLocation = repoLocation;
190:            }
191:
192:            public String getWso2esbVersion() {
193:                return wso2esbVersion;
194:            }
195:
196:            public void setWso2esbVersion(String wso2esbVersion) {
197:                this.wso2esbVersion = wso2esbVersion;
198:            }
199:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.