javax.net.ssl.SSLSessionBindingEvent Java Examples
The following examples show how to use
javax.net.ssl.SSLSessionBindingEvent.
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 File: OpenSSLEngine.java From Tomcat8-Source-Read with MIT License | 6 votes |
@Override public void putValue(String name, Object value) { if (name == null) { throw new IllegalArgumentException(sm.getString("engine.nullName")); } if (value == null) { throw new IllegalArgumentException(sm.getString("engine.nullValue")); } Map<String, Object> values = this.values; if (values == null) { // Use size of 2 to keep the memory overhead small values = this.values = new HashMap<>(2); } Object old = values.put(name, value); if (value instanceof SSLSessionBindingListener) { ((SSLSessionBindingListener) value).valueBound(new SSLSessionBindingEvent(this, name)); } notifyUnbound(old, name); }
Example #2
Source File: ReferenceCountedOpenSslEngine.java From netty-4.1.22 with Apache License 2.0 | 6 votes |
@Override public void putValue(String name, Object value) { if (name == null) { throw new NullPointerException("name"); } if (value == null) { throw new NullPointerException("value"); } Map<String, Object> values = this.values; if (values == null) { // Use size of 2 to keep the memory overhead small values = this.values = new HashMap<String, Object>(2); } Object old = values.put(name, value); if (value instanceof SSLSessionBindingListener) { ((SSLSessionBindingListener) value).valueBound(new SSLSessionBindingEvent(this, name)); } notifyUnbound(old, name); }
Example #3
Source File: OpenSSlSession.java From wildfly-openssl with Apache License 2.0 | 6 votes |
@Override public synchronized void putValue(String name, Object value) { if (name == null) { throw new IllegalArgumentException(Messages.MESSAGES.nameWasNull()); } if (value == null) { throw new IllegalArgumentException(Messages.MESSAGES.valueWasNull()); } Map<String, Object> values = this.values; if (values == null) { // Use size of 2 to keep the memory overhead small values = this.values = new HashMap<>(2); } Object old = values.put(name, value); if (value instanceof SSLSessionBindingListener) { ((SSLSessionBindingListener) value).valueBound(new SSLSessionBindingEvent(this, name)); } notifyUnbound(old, name); }
Example #4
Source File: OpenSslEngine.java From netty4.0.27Learn with Apache License 2.0 | 6 votes |
@Override public void putValue(String name, Object value) { ObjectUtil.checkNotNull(name, "name"); ObjectUtil.checkNotNull(value, "value"); Map<String, Object> values = this.values; if (values == null) { // Use size of 2 to keep the memory overhead small values = this.values = new HashMap<String, Object>(2); } Object old = values.put(name, value); if (value instanceof SSLSessionBindingListener) { ((SSLSessionBindingListener) value).valueBound(new SSLSessionBindingEvent(this, name)); } notifyUnbound(old, name); }
Example #5
Source File: mySSLSession.java From j2objc with Apache License 2.0 | 5 votes |
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); } }
Example #6
Source File: mySSLSession.java From j2objc with Apache License 2.0 | 5 votes |
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); } }
Example #7
Source File: OpenSSLEngine.java From Tomcat8-Source-Read with MIT License | 4 votes |
private void notifyUnbound(Object value, String name) { if (value instanceof SSLSessionBindingListener) { ((SSLSessionBindingListener) value).valueUnbound(new SSLSessionBindingEvent(this, name)); } }
Example #8
Source File: ReferenceCountedOpenSslEngine.java From netty-4.1.22 with Apache License 2.0 | 4 votes |
private void notifyUnbound(Object value, String name) { if (value instanceof SSLSessionBindingListener) { ((SSLSessionBindingListener) value).valueUnbound(new SSLSessionBindingEvent(this, name)); } }
Example #9
Source File: SSLSessionFinalizeTest.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
@Override public void valueBound(SSLSessionBindingEvent event) { System.out.printf(" valueBound: %s%n", event.getName()); }
Example #10
Source File: SSLSessionFinalizeTest.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
@Override public void valueUnbound(SSLSessionBindingEvent event) { System.out.printf(" valueUnbound: %s%n", event.getName()); unboundNotified++; }
Example #11
Source File: OpenSSlSession.java From wildfly-openssl with Apache License 2.0 | 4 votes |
private void notifyUnbound(Object value, String name) { if (value instanceof SSLSessionBindingListener) { ((SSLSessionBindingListener) value).valueUnbound(new SSLSessionBindingEvent(this, name)); } }
Example #12
Source File: OpenSslEngine.java From netty4.0.27Learn with Apache License 2.0 | 4 votes |
private void notifyUnbound(Object value, String name) { if (value instanceof SSLSessionBindingListener) { ((SSLSessionBindingListener) value).valueUnbound(new SSLSessionBindingEvent(this, name)); } }
Example #13
Source File: SSLSessionBindingEventTest.java From j2objc with Apache License 2.0 | 4 votes |
/** * 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()); }