use of javax.net.ssl.SSLSessionBindingEvent in project robovm by robovm.
the class SSLSessionImpl method removeValue.
public void removeValue(String name) {
if (name == null) {
throw new IllegalArgumentException("name == null");
}
Object old = values.remove(name);
if (old instanceof SSLSessionBindingListener) {
SSLSessionBindingListener listener = (SSLSessionBindingListener) old;
listener.valueUnbound(new SSLSessionBindingEvent(this, name));
}
}
use of javax.net.ssl.SSLSessionBindingEvent in project robovm by robovm.
the class OpenSSLSessionImpl method removeValue.
/**
* Removes a link (name) with the specified value object of the SSL
* session's application layer data.
*
* <p>If the value object implements the <code>SSLSessionBindingListener</code>
* interface, the object will receive a <code>valueUnbound</code> notification.
*
* @param name the name of the link (no null are
* accepted!)
* @throws IllegalArgumentException if the argument is null.
*/
public void removeValue(String name) {
if (name == null) {
throw new IllegalArgumentException("name == null");
}
Object old = values.remove(name);
if (old instanceof SSLSessionBindingListener) {
SSLSessionBindingListener listener = (SSLSessionBindingListener) old;
listener.valueUnbound(new SSLSessionBindingEvent(this, name));
}
}
use of javax.net.ssl.SSLSessionBindingEvent in project robovm by robovm.
the class MySSLSession method test_ConstructorLjavax_net_ssl_SSLSessionLjava_lang_String.
public final void test_ConstructorLjavax_net_ssl_SSLSessionLjava_lang_String() {
SSLSession ses = new MySSLSession();
try {
SSLSessionBindingEvent event = new SSLSessionBindingEvent(ses, "test");
if (!"test".equals(event.getName())) {
fail("incorrect name");
}
if (!event.getSession().equals(ses)) {
fail("incorrect session");
}
} catch (Exception e) {
fail("Unexpected exception " + e);
}
try {
SSLSessionBindingEvent event = new SSLSessionBindingEvent(null, "test");
fail("IllegalArgumentException expected");
} catch (IllegalArgumentException e) {
// expected
}
try {
SSLSessionBindingEvent event = new SSLSessionBindingEvent(ses, null);
} catch (IllegalArgumentException e) {
fail("Unexpected IllegalArgumentException: " + e);
}
}
use of javax.net.ssl.SSLSessionBindingEvent in project robovm by robovm.
the class mySSLSession method removeValue.
public void removeValue(String s) {
if (s == null)
throw new IllegalArgumentException("argument can not be null");
Object obj = table.remove(s);
if (obj instanceof SSLSessionBindingListener) {
SSLSessionBindingEvent sslsessionbindingevent = new SSLSessionBindingEvent(this, s);
((SSLSessionBindingListener) obj).valueUnbound(sslsessionbindingevent);
}
}
use of javax.net.ssl.SSLSessionBindingEvent in project jdk8u_jdk by JetBrains.
the class SecureKey method removeValue.
/**
* Removes the specified session value, delivering a session changed
* event as appropriate.
*/
@Override
public void removeValue(String key) {
if (key == null) {
throw new IllegalArgumentException("argument can not be null");
}
SecureKey secureKey = new SecureKey(key);
Object value = table.remove(secureKey);
if (value instanceof SSLSessionBindingListener) {
SSLSessionBindingEvent e;
e = new SSLSessionBindingEvent(this, key);
((SSLSessionBindingListener) value).valueUnbound(e);
}
}
Aggregations