Java 8 SSLSessionContext - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 SSLSessionContext class.

This code example shows how to use the following methods:getSessionTimeout
        isValid = false;
        context = null;
    } 
 
    public boolean isValid() { 
        if (isValid && context != null && context.getSessionTimeout() != 0
                && lastAccessedTime + context.getSessionTimeout() > System.currentTimeMillis()) {
            isValid = false;
        } 
        return isValid;
    } 
 
    public void putValue(String name, Object value) {
        if (name == null || value == null) {
            throw new IllegalArgumentException("Parameter is null");
        } 
        Object old = values.put(new ValueKey(name), value);
        if (value instanceof SSLSessionBindingListener) {
            ((SSLSessionBindingListener) value).valueBound(new SSLSessionBindingEvent(this, name));
        } 
4
CodeRank
This code example shows how to use the following methods:getSessionTimeout
        isValid = false;
        context = null;
    } 
 
    public boolean isValid() { 
        if (isValid && context != null && context.getSessionTimeout() != 0
                && lastAccessedTime + context.getSessionTimeout() > System.currentTimeMillis()) {
            isValid = false;
        } 
        return isValid;
    } 
 
    public void putValue(String name, Object value) {
        if (name == null || value == null) {
            throw new IllegalArgumentException("name == null || value == null");
        } 
        Object old = values.put(name, value);
        if (value instanceof SSLSessionBindingListener) {
            ((SSLSessionBindingListener) value).valueBound(new SSLSessionBindingEvent(this, name));
        } 
3
CodeRank
This code example shows how to use the following methods:getSessionTimeout
     */ 
    public boolean isValid() { 
        SSLSessionContext context = sessionContext;
        if (isValid
                && context != null
                && context.getSessionTimeout() != 0
                && getCreationTime() + (context.getSessionTimeout() * 1000)
                    < System.currentTimeMillis()) {
            isValid = false;
        } 
        return isValid;
    } 
 
    /** 
     * It invalidates a SSL session forbidding any resumption. 
     */ 
    public void invalidate() { 
        isValid = false;
        sessionContext = null;
    } 
3
CodeRank
This code example shows how to use the following methods:getSessionTimeout
        isValid = false;
        context = null;
    } 
 
    public boolean isValid() { 
        if (isValid && context != null && context.getSessionTimeout() != 0
                && lastAccessedTime + context.getSessionTimeout() > System.currentTimeMillis()) {
            isValid = false;
        } 
        return isValid;
    } 
 
    public void putValue(String name, Object value) {
        if (name == null || value == null) {
            throw new IllegalArgumentException("name == null || value == null");
        } 
        Object old = values.put(name, value);
        if (value instanceof SSLSessionBindingListener) {
            ((SSLSessionBindingListener) value).valueBound(new SSLSessionBindingEvent(this, name));
        } 
3
CodeRank
This code example shows how to use the following methods:getSessionTimeout
     */ 
    public boolean isValid() { 
        SSLSessionContext context = sessionContext;
        if (isValid
                && context != null
                && context.getSessionTimeout() != 0
                && lastAccessedTime + context.getSessionTimeout() > System
                        .currentTimeMillis()) {
            isValid = false;
        } 
        return isValid;
    } 
 
    /** 
     * It invalidates a SSL session forbidding any resumption. 
     */ 
    public void invalidate() { 
        isValid = false;
    } 
 
3
CodeRank
See Code Examples for Java 8 SSLSessionContext Methods: