KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cocoon > webservices > system > System


1 /*
2  * Copyright 1999-2005 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.cocoon.webservices.system;
17
18 import java.util.Properties JavaDoc;
19 import org.apache.commons.lang.SystemUtils;
20
21 /**
22  * Class which provides JVM system related SOAP services.
23  *
24  * @author <a HREF="mailto:crafterm@apache.org">Marcus Crafter</a>
25  * @version $Id: System.java 169477 2005-05-10 14:20:17Z vgritsenko $
26  */

27 public class System {
28
29     /**
30      * <code>getProperties</code> returns the current System Properties object.
31      *
32      * @return a <code>Properties</code> instance
33      * @throws SecurityException if access is denied
34      */

35     public Properties JavaDoc getProperties() {
36         return java.lang.System.getProperties();
37     }
38
39     /**
40      * <code>getArchitecture</code> returns the host architecture.
41      *
42      * @return host architecture
43      */

44     public String JavaDoc getArchitecture() {
45         return SystemUtils.OS_ARCH;
46     }
47
48     /**
49      * <code>getOperatingSystem</code> returns the host operating system
50      *
51      * @return host operating system
52      */

53     public String JavaDoc getOperatingSystem() {
54         return SystemUtils.OS_NAME;
55     }
56
57     /**
58      * <code>getOperatingSystemVersion</code> returns the host operating system
59      * version
60      *
61      * @return host operating system version
62      */

63     public String JavaDoc getOperatingSystemVersion() {
64         return SystemUtils.OS_VERSION;
65     }
66 }
67
Popular Tags