com.caucho.util
Class CauchoSystem
java.lang.Object
|
+--com.caucho.util.CauchoSystem
- public class CauchoSystem
- extends java.lang.Object
A wrapper for Caucho system variables, allowing tests to override
the default variables.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
isTesting
public static boolean isTesting()
- Returns true if we're currently running a test.
setIsTesting
public static void setIsTesting(boolean testing)
setResinHome
public static void setResinHome(Path path)
- Sets the Path to be used as ResinHome.
getResinHome
public static Path getResinHome()
- Gets the Path used as ResinHome.
getVersionId
public static int getVersionId()
getResinConfig
public static java.lang.String getResinConfig()
getWorkPath
public static Path getWorkPath()
getUserDir
public static java.lang.String getUserDir()
getFileSeparatorChar
public static char getFileSeparatorChar()
getPathSeparatorChar
public static char getPathSeparatorChar()
getNewlineString
public static java.lang.String getNewlineString()
isWindows
public static boolean isWindows()
isUnix
public static boolean isUnix()
setWindowsTest
public static void setWindowsTest(boolean windows)
getLocalHost
public static java.lang.String getLocalHost()
getUserName
public static java.lang.String getUserName()
getCpuUsage
public static CpuUsage getCpuUsage()
isJdk12
public static boolean isJdk12()
loadClass
public static java.lang.Class loadClass(java.lang.String name,
boolean init,
java.lang.ClassLoader loader)
throws java.lang.ClassNotFoundException
getContextClassLoader
public static java.lang.ClassLoader getContextClassLoader()
setContextClassLoader
public static void setContextClassLoader(java.lang.ClassLoader loader)
setStaticClassLoader
public static void setStaticClassLoader(java.lang.ClassLoader loader)
getStaticClassLoader
public static java.lang.ClassLoader getStaticClassLoader()
setUser
public static boolean setUser(java.lang.String user,
java.lang.String group)
throws java.lang.Exception
- Sets the runtime user so we don't need to run as root.
setUser
public static boolean setUser()
throws java.lang.Exception