Package org.apache.tomcat.jni
Class OS
java.lang.Object
org.apache.tomcat.jni.OS
Deprecated.
The scope of the APR/Native Library will be reduced in Tomcat
              10.1.x / Tomcat Native 2.x onwards to only include those
              components required to provide OpenSSL integration with the NIO
              and NIO2 connectors.
OS
- Author:
- Mladen Turk
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final booleanDeprecated.static final booleanDeprecated.static final booleanDeprecated.static final booleanDeprecated.Hard-coded to false since there has not been a supported Netware platform for many years.static final booleanDeprecated.static final booleanDeprecated.static final booleanDeprecated.static final booleanDeprecated.static final intDeprecated.static final intDeprecated.static final intDeprecated.static final intDeprecated.static final intDeprecated.static final intDeprecated.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic StringdefaultEncoding(long pool) Deprecated.Get the name of the system default character set.static StringDeprecated.Expand environment variables.static intinfo(long[] inf) Deprecated.Gather system info.static StringlocaleEncoding(long pool) Deprecated.Get the name of the current locale character set.static intrandom(byte[] buf, int len) Deprecated.Generate random bytes.static voidDeprecated.Log message.static voidsysloginit(String domain) Deprecated.Initialize system logging.
- 
Field Details- 
LOG_EMERGpublic static final int LOG_EMERGDeprecated.- See Also:
 
- 
LOG_ERRORpublic static final int LOG_ERRORDeprecated.- See Also:
 
- 
LOG_NOTICEpublic static final int LOG_NOTICEDeprecated.- See Also:
 
- 
LOG_WARNpublic static final int LOG_WARNDeprecated.- See Also:
 
- 
LOG_INFOpublic static final int LOG_INFODeprecated.- See Also:
 
- 
LOG_DEBUGpublic static final int LOG_DEBUGDeprecated.- See Also:
 
- 
IS_UNIXpublic static final boolean IS_UNIXDeprecated.
- 
IS_NETWAREDeprecated.Hard-coded to false since there has not been a supported Netware platform for many years. This will be removed in Tomcat 10 onwards- See Also:
 
- 
IS_WIN32public static final boolean IS_WIN32Deprecated.
- 
IS_WIN64public static final boolean IS_WIN64Deprecated.
- 
IS_LINUXpublic static final boolean IS_LINUXDeprecated.
- 
IS_SOLARISpublic static final boolean IS_SOLARISDeprecated.
- 
IS_BSDpublic static final boolean IS_BSDDeprecated.
- 
IS_MACOSXpublic static final boolean IS_MACOSXDeprecated.
 
- 
- 
Constructor Details- 
OSpublic OS()Deprecated.
 
- 
- 
Method Details- 
defaultEncodingDeprecated.Get the name of the system default character set.- Parameters:
- pool- the pool to allocate the name from, if needed
- Returns:
- the encoding
 
- 
localeEncodingDeprecated.Get the name of the current locale character set. Defers to apr_os_default_encoding if the current locale's data can't be retrieved on this system.- Parameters:
- pool- the pool to allocate the name from, if needed
- Returns:
- the encoding
 
- 
randompublic static int random(byte[] buf, int len) Deprecated.Generate random bytes.- Parameters:
- buf- Buffer to fill with random bytes
- len- Length of buffer in bytes
- Returns:
- the operation status
 
- 
infopublic static int info(long[] inf) Deprecated.Gather system info.On exit the inf array will be filled with: inf[0] - Total usable main memory size inf[1] - Available memory size inf[2] - Total page file/swap space size inf[3] - Page file/swap space still available inf[4] - Amount of shared memory inf[5] - Memory used by buffers inf[6] - Memory Load inf[7] - Idle Time in microseconds inf[8] - Kernel Time in microseconds inf[9] - User Time in microseconds inf[10] - Process creation time (apr_time_t) inf[11] - Process Kernel Time in microseconds inf[12] - Process User Time in microseconds inf[13] - Current working set size. inf[14] - Peak working set size. inf[15] - Number of page faults. - Parameters:
- inf- array that will be filled with system information. Array length must be at least 16.
- Returns:
- the operation status
 
- 
expandDeprecated.Expand environment variables.- Parameters:
- str- String to expand
- Returns:
- Expanded string with replaced environment variables.
 
- 
sysloginitDeprecated.Initialize system logging.- Parameters:
- domain- String that will be prepended to every message
 
- 
syslogDeprecated.Log message.- Parameters:
- level- Log message severity. See LOG_XXX enums.
- message- Message to log
 
 
-