Search in sources :

Example 11 with SSLSessionBindingEvent

use of javax.net.ssl.SSLSessionBindingEvent in project jdk8u_jdk by JetBrains.

the class SecureKey method putValue.

/**
     * Assigns a session value.  Session change events are given if
     * appropriate, to any original value as well as the new value.
     */
@Override
public void putValue(String key, Object value) {
    if ((key == null) || (value == null)) {
        throw new IllegalArgumentException("arguments can not be null");
    }
    SecureKey secureKey = new SecureKey(key);
    Object oldValue = table.put(secureKey, value);
    if (oldValue instanceof SSLSessionBindingListener) {
        SSLSessionBindingEvent e;
        e = new SSLSessionBindingEvent(this, key);
        ((SSLSessionBindingListener) oldValue).valueUnbound(e);
    }
    if (value instanceof SSLSessionBindingListener) {
        SSLSessionBindingEvent e;
        e = new SSLSessionBindingEvent(this, key);
        ((SSLSessionBindingListener) value).valueBound(e);
    }
}
Also used : SSLSessionBindingEvent(javax.net.ssl.SSLSessionBindingEvent) SSLSessionBindingListener(javax.net.ssl.SSLSessionBindingListener)

Aggregations

SSLSessionBindingEvent (javax.net.ssl.SSLSessionBindingEvent)11 SSLSessionBindingListener (javax.net.ssl.SSLSessionBindingListener)8 SSLSession (javax.net.ssl.SSLSession)3 SSLPeerUnverifiedException (javax.net.ssl.SSLPeerUnverifiedException)1