本文整理汇总了Java中sun.security.action.GetIntegerAction类的典型用法代码示例。如果您正苦于以下问题:Java GetIntegerAction类的具体用法?Java GetIntegerAction怎么用?Java GetIntegerAction使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
GetIntegerAction类属于sun.security.action包,在下文中一共展示了GetIntegerAction类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initializeClockSkew
import sun.security.action.GetIntegerAction; //导入依赖的package包/类
/**
* Initialize the maximum allowable clock skew by getting the OCSP
* clock skew system property. If the property has not been set, or if its
* value is negative, set the skew to the default.
*/
private static int initializeClockSkew() {
Integer tmp = java.security.AccessController.doPrivileged(
new GetIntegerAction("com.sun.security.ocsp.clockSkew"));
if (tmp == null || tmp < 0) {
return DEFAULT_MAX_CLOCK_SKEW;
}
// Convert to milliseconds, as the system property will be
// specified in seconds
return tmp * 1000;
}
示例2: initializeTimeout
import sun.security.action.GetIntegerAction; //导入依赖的package包/类
/**
* Initialize the timeout length by getting the OCSP timeout
* system property. If the property has not been set, or if its
* value is negative, set the timeout length to the default.
*/
private static int initializeTimeout() {
Integer tmp = java.security.AccessController.doPrivileged(
new GetIntegerAction("com.sun.security.ocsp.timeout"));
if (tmp == null || tmp < 0) {
return DEFAULT_CONNECT_TIMEOUT;
}
// Convert to milliseconds, as the system property will be
// specified in seconds
return tmp * 1000;
}
示例3: initializeTimeout
import sun.security.action.GetIntegerAction; //导入依赖的package包/类
/**
* Initialize the timeout length by getting the CRL timeout
* system property. If the property has not been set, or if its
* value is negative, set the timeout length to the default.
*/
private static int initializeTimeout() {
Integer tmp = java.security.AccessController.doPrivileged(
new GetIntegerAction("com.sun.security.crl.timeout"));
if (tmp == null || tmp < 0) {
return DEFAULT_CRL_CONNECT_TIMEOUT;
}
// Convert to milliseconds, as the system property will be
// specified in seconds
return tmp * 1000;
}
示例4: getPollInterval
import sun.security.action.GetIntegerAction; //导入依赖的package包/类
private static int getPollInterval() {
synchronized (XClipboard.classLock) {
if (pollInterval <= 0) {
pollInterval = AccessController.doPrivileged(
new GetIntegerAction("awt.datatransfer.clipboard.poll.interval",
defaultPollInterval));
if (pollInterval <= 0) {
pollInterval = defaultPollInterval;
}
}
return pollInterval;
}
}
示例5: getDatatransferTimeout
import sun.security.action.GetIntegerAction; //导入依赖的package包/类
public static int getDatatransferTimeout() {
Integer dt = (Integer)AccessController.doPrivileged(
new GetIntegerAction("sun.awt.datatransfer.timeout"));
if (dt == null || dt <= 0) {
return DEFAULT_DATATRANSFER_TIMEOUT;
} else {
return dt;
}
}
示例6: getDatatransferTimeout
import sun.security.action.GetIntegerAction; //导入依赖的package包/类
public static int getDatatransferTimeout() {
Integer dt = AccessController.doPrivileged(
new GetIntegerAction("sun.awt.datatransfer.timeout"));
if (dt == null || dt <= 0) {
return DEFAULT_DATATRANSFER_TIMEOUT;
} else {
return dt;
}
}