• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java SSLSessionBindingEvent类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中javax.net.ssl.SSLSessionBindingEvent的典型用法代码示例。如果您正苦于以下问题:Java SSLSessionBindingEvent类的具体用法?Java SSLSessionBindingEvent怎么用?Java SSLSessionBindingEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



SSLSessionBindingEvent类属于javax.net.ssl包,在下文中一共展示了SSLSessionBindingEvent类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: putValue

import javax.net.ssl.SSLSessionBindingEvent; //导入依赖的package包/类
@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);
}
 
开发者ID:wildfly,项目名称:wildfly-openssl,代码行数:20,代码来源:OpenSSlSession.java


示例2: putValue

import javax.net.ssl.SSLSessionBindingEvent; //导入依赖的package包/类
@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);
}
 
开发者ID:wuyinxian124,项目名称:netty4.0.27Learn,代码行数:17,代码来源:OpenSslEngine.java


示例3: test_valueBound

import javax.net.ssl.SSLSessionBindingEvent; //导入依赖的package包/类
/**
 * @throws IOException
 * @throws UnknownHostException
 * @throws InterruptedException
 * @tests javax.net.ssl.SSLSessionBindingListener#valueBound(SSLSessionBindingEvent event)
 */
@TestTargetNew(
    level = TestLevel.COMPLETE,
    notes = "",
    method = "valueBound",
    args = {SSLSessionBindingEvent.class}
)
public void test_valueBound() throws UnknownHostException, IOException,
        InterruptedException {
    SSLSocket sock = (SSLSocket) SSLSocketFactory.getDefault()
            .createSocket();
    SSLSession ss = sock.getSession();
    mySSLSessionBindingListener sbl = new mySSLSessionBindingListener();
    ss.putValue("test", sbl);
    assertTrue("valueBound was not called.", sbl.boundDone);
}
 
开发者ID:keplersj,项目名称:In-the-Box-Fork,代码行数:22,代码来源:SSLSessionBindingListenerTest.java


示例4: test_valueUnbound

import javax.net.ssl.SSLSessionBindingEvent; //导入依赖的package包/类
/**
 * @throws IOException
 * @throws UnknownHostException
 * @tests javax.net.ssl.SSLSessionBindingListener#valueUnbound(SSLSessionBindingEvent event)
 */
@TestTargetNew(
    level = TestLevel.COMPLETE,
    notes = "",
    method = "valueUnbound",
    args = {SSLSessionBindingEvent.class}
)
public void test_valueUnbound() throws UnknownHostException, IOException {
    SSLSocket sock = (SSLSocket) SSLSocketFactory.getDefault()
            .createSocket();
    SSLSession ss = sock.getSession();
    mySSLSessionBindingListener sbl = new mySSLSessionBindingListener();
    ss.putValue("test", sbl);
    ss.removeValue("test");
    assertTrue("valueUnbound was not called.", sbl.unboundDone);
}
 
开发者ID:keplersj,项目名称:In-the-Box-Fork,代码行数:21,代码来源:SSLSessionBindingListenerTest.java


示例5: putValue

import javax.net.ssl.SSLSessionBindingEvent; //导入依赖的package包/类
/**
 * @see javax.net.ssl.SSLSession.putValue(String name, Object value)
 */
public void putValue(String name, Object value) {
    if (name == null || value == null) {
        throw new IllegalArgumentException("Parameter is null");
    }
    Object old = values.put(name, AccessController.getContext(), value);
    if (value instanceof SSLSessionBindingListener) {
        ((SSLSessionBindingListener) value)
                .valueBound(new SSLSessionBindingEvent(this, name));
    }
    if (old != null && old instanceof SSLSessionBindingListener) {
        ((SSLSessionBindingListener) old)
                .valueUnbound(new SSLSessionBindingEvent(this, name));
    }

}
 
开发者ID:freeVM,项目名称:freeVM,代码行数:19,代码来源:SSLSessionImpl.java


示例6: putValue

import javax.net.ssl.SSLSessionBindingEvent; //导入依赖的package包/类
@Override
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));
  }
  if (old instanceof SSLSessionBindingListener) {
    ((SSLSessionBindingListener) old).valueUnbound(new SSLSessionBindingEvent(this, name));
  }

}
 
开发者ID:google,项目名称:conscrypt,代码行数:15,代码来源:ExternalSession.java


示例7: removeValue

import javax.net.ssl.SSLSessionBindingEvent; //导入依赖的package包/类
@Override
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));
  }
}
 
开发者ID:google,项目名称:conscrypt,代码行数:12,代码来源:ExternalSession.java


示例8: putValue

import javax.net.ssl.SSLSessionBindingEvent; //导入依赖的package包/类
public void putValue(String name, Object value)
{
  values.put(name, value);
  try
    {
      if (value instanceof SSLSessionBindingListener)
        ((SSLSessionBindingListener) value).valueBound
          (new SSLSessionBindingEvent(this, name));
    }
  catch (Exception x)
    {
    }
}
 
开发者ID:vilie,项目名称:javify,代码行数:14,代码来源:Session.java


示例9: removeValue

import javax.net.ssl.SSLSessionBindingEvent; //导入依赖的package包/类
public void removeValue(String name)
{
  Object value = values.remove(name);
  try
    {
      if (value instanceof SSLSessionBindingListener)
        ((SSLSessionBindingListener) value).valueUnbound
          (new SSLSessionBindingEvent(this, name));
    }
  catch (Exception x)
    {
    }
}
 
开发者ID:vilie,项目名称:javify,代码行数:14,代码来源:Session.java


示例10: removeValue

import javax.net.ssl.SSLSessionBindingEvent; //导入依赖的package包/类
public void removeValue(String name)
{
  Object value = values.remove(name);
  try
    {
      if (value instanceof SSLSessionBindingListener)
        ((SSLSessionBindingListener) value).valueUnbound
          (new SSLSessionBindingEvent(this, name));
    }
  catch (Exception x)
    {
    }   
}
 
开发者ID:nmldiegues,项目名称:jvm-stm,代码行数:14,代码来源:Session.java


示例11: putValue

import javax.net.ssl.SSLSessionBindingEvent; //导入依赖的package包/类
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);
    }
}
 
开发者ID:keplersj,项目名称:In-the-Box-Fork,代码行数:14,代码来源:mySSLSession.java


示例12: removeValue

import javax.net.ssl.SSLSessionBindingEvent; //导入依赖的package包/类
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);
    }
}
 
开发者ID:keplersj,项目名称:In-the-Box-Fork,代码行数:10,代码来源:mySSLSession.java


示例13: putValue

import javax.net.ssl.SSLSessionBindingEvent; //导入依赖的package包/类
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));
    }
    if (old instanceof SSLSessionBindingListener) {
        ((SSLSessionBindingListener) old).valueUnbound(new SSLSessionBindingEvent(this, name));
    }

}
 
开发者ID:keplersj,项目名称:In-the-Box-Fork,代码行数:14,代码来源:SSLSessionImpl.java


示例14: removeValue

import javax.net.ssl.SSLSessionBindingEvent; //导入依赖的package包/类
public void removeValue(String name) {
    if (name == null) {
        throw new IllegalArgumentException("Parameter is null");
    }
    Object old = values.remove(new ValueKey(name));
    if (old instanceof SSLSessionBindingListener) {
        SSLSessionBindingListener listener = (SSLSessionBindingListener) old;
        listener.valueUnbound(new SSLSessionBindingEvent(this, name));
    }
}
 
开发者ID:keplersj,项目名称:In-the-Box-Fork,代码行数:11,代码来源:SSLSessionImpl.java


示例15: test_getSession

import javax.net.ssl.SSLSessionBindingEvent; //导入依赖的package包/类
/**
 * @tests javax.net.ssl.SSLSessionBindingEvent#getSession()
 */
@TestTargetNew(
    level = TestLevel.COMPLETE,
    notes = "",
    method = "getSession",
    args = {}
)
public void test_getSession() {
    SSLSession ses = new MySSLSession();
    SSLSessionBindingEvent event = new SSLSessionBindingEvent(ses, "test");
    assertEquals("Incorrect session", ses, event.getSession());
}
 
开发者ID:keplersj,项目名称:In-the-Box-Fork,代码行数:15,代码来源:SSLSessionBindingEventTest.java


示例16: putValue

import javax.net.ssl.SSLSessionBindingEvent; //导入依赖的package包/类
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));
    }
    if (old != null && old instanceof SSLSessionBindingListener) {
        ((SSLSessionBindingListener) old).valueUnbound(new SSLSessionBindingEvent(this, name));
    }

}
 
开发者ID:shannah,项目名称:cn1,代码行数:14,代码来源:SSLSessionImpl.java


示例17: getData

import javax.net.ssl.SSLSessionBindingEvent; //导入依赖的package包/类
@Override
protected Object[] getData() {
    try {
        SSLContext cont = SSLContext.getInstance("TLS");
        cont.init(null, null, null);
        SSLSocket soc = (SSLSocket )cont.getSocketFactory().createSocket();
        return new Object[] { new SSLSessionBindingEvent(soc.getSession(), "someName")};
    } catch (Exception e) {
        fail("Can not create data: "+ e);
        return null;
    }
}
 
开发者ID:shannah,项目名称:cn1,代码行数:13,代码来源:SSLSessionBindingEventTest.java


示例18: testSSLSessionBindingEvent

import javax.net.ssl.SSLSessionBindingEvent; //导入依赖的package包/类
public final void testSSLSessionBindingEvent() {
    SSLSession ses = new MySSLSession();
    SSLSessionBindingEvent event = new SSLSessionBindingEvent(ses, "test");
    
    assertEquals("test", event.getName());
    assertEquals(ses, event.getSession());
}
 
开发者ID:shannah,项目名称:cn1,代码行数:8,代码来源:SSLSessionBindingEventTest.java


示例19: getData

import javax.net.ssl.SSLSessionBindingEvent; //导入依赖的package包/类
protected Object[] getData() {
    try {
        SSLContext cont = SSLContext.getInstance("TLS");
        cont.init(null, null, null);
        SSLSocket soc = (SSLSocket )cont.getSocketFactory().createSocket();
        return new Object[] { new SSLSessionBindingEvent(soc.getSession(), "someName")};
    } catch (Exception e) {
        fail("Can not create data: "+ e);
        return null;
    }
}
 
开发者ID:freeVM,项目名称:freeVM,代码行数:12,代码来源:SSLSessionBindingEventTest.java


示例20: testSSLSessionBindingEvent

import javax.net.ssl.SSLSessionBindingEvent; //导入依赖的package包/类
public final void testSSLSessionBindingEvent() {
    SSLSession ses = new MySSLSession();
    SSLSessionBindingEvent event = new SSLSessionBindingEvent(ses, "test");
    if (!"test".equals(event.getName())) {
        fail("incorrect name");
    }
    if (!event.getSession().equals(ses)) {
        fail("incorrect session");
    }
}
 
开发者ID:freeVM,项目名称:freeVM,代码行数:11,代码来源:SSLSessionBindingEventTest.java



注:本文中的javax.net.ssl.SSLSessionBindingEvent类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java IntrospectedTableMyBatis3Impl类代码示例发布时间:2022-05-21
下一篇:
Java AjaxSubmitLink类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap