use of javax.net.ssl.SSLSessionBindingEvent in project robovm by robovm.
the class MySSLSession method test_getSession.
/**
* javax.net.ssl.SSLSessionBindingEvent#getSession()
*/
public void test_getSession() {
SSLSession ses = new MySSLSession();
SSLSessionBindingEvent event = new SSLSessionBindingEvent(ses, "test");
assertEquals("Incorrect session", ses, event.getSession());
}
use of javax.net.ssl.SSLSessionBindingEvent in project robovm by robovm.
the class MySSLSession method test_getName.
/**
* javax.net.ssl.SSLSessionBindingEvent#getName()
*/
public void test_getName() {
SSLSession ses = new MySSLSession();
SSLSessionBindingEvent event = new SSLSessionBindingEvent(ses, "test");
assertEquals("Incorrect session name", "test", event.getName());
event = new SSLSessionBindingEvent(ses, null);
assertEquals("Incorrect session name", null, event.getName());
}
use of javax.net.ssl.SSLSessionBindingEvent in project robovm by robovm.
the class mySSLSession method putValue.
public void putValue(String s, Object obj) {
if (s == null || obj == null)
throw new IllegalArgumentException("arguments can not be null");
Object obj1 = table.put(s, obj);
if (obj1 instanceof SSLSessionBindingListener) {
SSLSessionBindingEvent sslsessionbindingevent = new SSLSessionBindingEvent(this, s);
((SSLSessionBindingListener) obj1).valueUnbound(sslsessionbindingevent);
}
if (obj instanceof SSLSessionBindingListener) {
SSLSessionBindingEvent sslsessionbindingevent1 = new SSLSessionBindingEvent(this, s);
((SSLSessionBindingListener) obj).valueBound(sslsessionbindingevent1);
}
}
use of javax.net.ssl.SSLSessionBindingEvent in project XobotOS by xamarin.
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 XobotOS by xamarin.
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.
*
* <p>These links-to -data bounds are
* monitored, as a matter of security, by the full machinery of the
* <code>AccessController</code> class.
*
* @param name the name of the link (no null are
* accepted!)
* @throws <code>IllegalArgumentException</code> 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));
}
}
Aggregations