|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.server.util.CauchoSystem
public class CauchoSystem
A wrapper for Caucho system variables, allowing tests to override the default variables.
| Method Summary | |
|---|---|
static java.lang.String |
getClassPath()
Returns the system classpath, including the bootpath |
static CpuUsage |
getCpuUsage()
|
static char |
getFileSeparatorChar()
|
static double |
getLoadAvg()
|
static java.lang.String |
getLocalHost()
|
static java.lang.String |
getNewlineString()
|
static char |
getPathSeparatorChar()
|
static java.lang.String |
getResinConfig()
|
static Path |
getResinHome()
Gets the Path used as ResinHome. |
static java.lang.String |
getServerId()
|
static java.lang.String |
getUserDir()
|
static java.lang.String |
getUserName()
|
static long |
getVersionId()
public static Path getRootDirectory() { if (_rootDirectory != null) return _rootDirectory; String path = System.getProperty("server.root"); if (path != null) { _rootDirectory = Vfs.lookupNative(path); return _rootDirectory; } path = System.getProperty("resin.home"); if (path != null) { _rootDirectory = Vfs.lookupNative(path); return _rootDirectory; } _rootDirectory = getResinHome(); return _rootDirectory; } |
static Path |
getWorkPath()
Returns a path to the work directory. |
static boolean |
isCaseInsensitive()
|
static boolean |
isDetailedStatistics()
Detailed statistics cause various parts of Resin to keep more detailed statistics at the possible expense of some performance. |
static boolean |
isJdk15()
|
static boolean |
isTest()
|
static boolean |
isTesting()
Returns true if we're currently running a test. |
static boolean |
isUnix()
|
static boolean |
isWindows()
|
static java.lang.Class |
loadClass(java.lang.String name)
Loads a class from the context class loader. |
static java.lang.Class |
loadClass(java.lang.String name,
boolean init,
java.lang.ClassLoader loader)
Loads a class from a classloader. |
static void |
setDetailedStatistics(boolean isVerboseStatistics)
Set true to cause the tracking of detailed statistcs, default false. |
static void |
setIsTesting(boolean testing)
|
static void |
setResinHome(Path path)
Sets the Path to be used as ResinHome. |
static int |
setUser(java.lang.String user,
java.lang.String group)
Sets the runtime user so we don't need to run as root. |
static void |
setWindowsTest(boolean isWindows)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static boolean isTesting()
public static void setIsTesting(boolean testing)
public static void setResinHome(Path path)
public static Path getResinHome()
public static long getVersionId()
public static java.lang.String getResinConfig()
public static Path getWorkPath()
public static java.lang.String getServerId()
public static java.lang.String getUserDir()
public static char getFileSeparatorChar()
public static char getPathSeparatorChar()
public static java.lang.String getNewlineString()
public static boolean isWindows()
public static boolean isTest()
public static boolean isCaseInsensitive()
public static boolean isUnix()
public static void setWindowsTest(boolean isWindows)
public static java.lang.String getLocalHost()
public static boolean isJdk15()
public static java.lang.String getUserName()
public static void setDetailedStatistics(boolean isVerboseStatistics)
public static boolean isDetailedStatistics()
public static CpuUsage getCpuUsage()
public static java.lang.Class loadClass(java.lang.String name)
throws java.lang.ClassNotFoundException
name - the classname, separated by '.'
java.lang.ClassNotFoundException
public static java.lang.Class loadClass(java.lang.String name,
boolean init,
java.lang.ClassLoader loader)
throws java.lang.ClassNotFoundException
name - the classname, separated by '.'init - if true, resolves the class instancesloader - the class loader
java.lang.ClassNotFoundExceptionpublic static java.lang.String getClassPath()
public static double getLoadAvg()
public static int setUser(java.lang.String user,
java.lang.String group)
throws java.lang.Exception
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||