Java Code Examples for sun.security.action.GetIntegerAction

The following examples show how to use sun.security.action.GetIntegerAction. These examples are extracted from open source projects. 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 Project: jdk1.8-source-analysis   Source File: UNIXToolkit.java    License: Apache License 2.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 2
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 3
Source Project: dragonwell8_jdk   Source File: OCSPResponse.java    License: 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 4
Source Project: dragonwell8_jdk   Source File: OCSP.java    License: 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 Project: dragonwell8_jdk   Source File: URICertStore.java    License: 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 6
Source Project: dragonwell8_jdk   Source File: XClipboard.java    License: 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 7
Source Project: dragonwell8_jdk   Source File: UNIXToolkit.java    License: 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
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 9
Source Project: TencentKona-8   Source File: OCSPResponse.java    License: 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 10
Source Project: TencentKona-8   Source File: OCSP.java    License: 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 11
Source Project: TencentKona-8   Source File: URICertStore.java    License: 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 12
Source Project: TencentKona-8   Source File: XClipboard.java    License: 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 13
Source Project: TencentKona-8   Source File: UNIXToolkit.java    License: 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 14
Source Project: jdk8u60   Source File: OCSPResponse.java    License: 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 15
Source Project: jdk8u60   Source File: OCSP.java    License: 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 16
Source Project: jdk8u60   Source File: URICertStore.java    License: 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 17
Source Project: jdk8u60   Source File: XClipboard.java    License: 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 Project: jdk8u60   Source File: UNIXToolkit.java    License: 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 Project: JDKSourceCode1.8   Source File: UNIXToolkit.java    License: 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 20
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 21
Source Project: openjdk-jdk8u   Source File: OCSPResponse.java    License: 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 22
Source Project: openjdk-jdk8u   Source File: OCSP.java    License: 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 23
Source Project: openjdk-jdk8u   Source File: URICertStore.java    License: 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 24
Source Project: openjdk-jdk8u   Source File: XClipboard.java    License: 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 25
Source Project: openjdk-jdk8u   Source File: UNIXToolkit.java    License: 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 26
/**
 * 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 27
Source Project: openjdk-jdk8u-backup   Source File: OCSP.java    License: 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 Project: jdk8u-jdk   Source File: UNIXToolkit.java    License: 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 29
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 30
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;
    }
}