sun.security.action.GetIntegerAction Java Examples

The following examples show how to use sun.security.action.GetIntegerAction. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: OCSPResponse.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * 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;
}
 
Example #2
Source File: URICertStore.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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;
}
 
Example #3
Source File: URICertStore.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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;
}
 
Example #4
Source File: OCSP.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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;
}
 
Example #5
Source File: OCSPResponse.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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;
}
 
Example #6
Source File: UNIXToolkit.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
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;
    }
}
 
Example #7
Source File: UNIXToolkit.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
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;
    }
}
 
Example #8
Source File: OCSP.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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;
}
 
Example #9
Source File: OCSP.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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;
}
 
Example #10
Source File: KeepAliveCache.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
static int getMaxConnections() {
    if (result == -1) {
        result = AccessController.doPrivileged(
            new GetIntegerAction("http.maxConnections", MAX_CONNECTIONS))
            .intValue();
        if (result <= 0) {
            result = MAX_CONNECTIONS;
        }
    }
    return result;
}
 
Example #11
Source File: URICertStore.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * Initialize the timeout length by getting the specified CRL timeout
 * system property. If the property has not been set, or if its
 * value is negative, set the timeout length to the specified default.
 */
private static int initializeTimeout(String prop, int def) {
    Integer tmp = GetIntegerAction.privilegedGetProperty(prop);
    if (tmp == null || tmp < 0) {
        return def;
    }
    if (debug != null) {
        debug.println(prop + " set to " + tmp + " seconds");
    }
    // Convert to milliseconds, as the system property will be
    // specified in seconds
    return tmp * 1000;
}
 
Example #12
Source File: OCSP.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * 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;
}
 
Example #13
Source File: OCSPResponse.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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;
}
 
Example #14
Source File: OCSP.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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;
}
 
Example #15
Source File: URICertStore.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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;
}
 
Example #16
Source File: OCSPResponse.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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;
}
 
Example #17
Source File: XClipboard.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
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;
    }
}
 
Example #18
Source File: UNIXToolkit.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
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;
    }
}
 
Example #19
Source File: UNIXToolkit.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
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;
    }
}
 
Example #20
Source File: XClipboard.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
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;
    }
}
 
Example #21
Source File: UNIXToolkit.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
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;
    }
}
 
Example #22
Source File: SSLSessionContextImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private int getDefaultCacheLimit() {
    try {
        int defaultCacheLimit =
            java.security.AccessController.doPrivileged(
                new GetIntegerAction("javax.net.ssl.sessionCacheSize",
                                     DEFAULT_MAX_CACHE_SIZE)).intValue();

        if (defaultCacheLimit >= 0) {
            return defaultCacheLimit;
        }
    } catch (Exception e) {
    }

    return DEFAULT_MAX_CACHE_SIZE;
}
 
Example #23
Source File: OCSPResponse.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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;
}
 
Example #24
Source File: OCSP.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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;
}
 
Example #25
Source File: URICertStore.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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;
}
 
Example #26
Source File: UNIXToolkit.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
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;
    }
}
 
Example #27
Source File: OCSP.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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;
}
 
Example #28
Source File: XClipboard.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
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;
    }
}
 
Example #29
Source File: UNIXToolkit.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
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;
    }
}
 
Example #30
Source File: OCSPResponse.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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;
}