本文整理汇总了Java中javax.net.ssl.HandshakeCompletedListener.handshakeCompleted方法的典型用法代码示例。如果您正苦于以下问题:Java HandshakeCompletedListener.handshakeCompleted方法的具体用法?Java HandshakeCompletedListener.handshakeCompleted怎么用?Java HandshakeCompletedListener.handshakeCompleted使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.net.ssl.HandshakeCompletedListener
的用法示例。
在下文中一共展示了HandshakeCompletedListener.handshakeCompleted方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: notifyHandshakeCompletedListeners
import javax.net.ssl.HandshakeCompletedListener; //导入方法依赖的package包/类
final void notifyHandshakeCompletedListeners() {
if (listeners != null && !listeners.isEmpty()) {
// notify the listeners
HandshakeCompletedEvent event = new HandshakeCompletedEvent(this, getActiveSession());
for (HandshakeCompletedListener listener : listeners) {
try {
listener.handshakeCompleted(event);
} catch (RuntimeException e) {
// The RI runs the handlers in a separate thread,
// which we do not. But we try to preserve their
// behavior of logging a problem and not killing
// the handshaking thread just because a listener
// has a problem.
Thread thread = Thread.currentThread();
thread.getUncaughtExceptionHandler().uncaughtException(thread, e);
}
}
}
}
示例2: notifyHandshakeCompletedListeners
import javax.net.ssl.HandshakeCompletedListener; //导入方法依赖的package包/类
private void notifyHandshakeCompletedListeners() {
if (listeners != null && !listeners.isEmpty()) {
// notify the listeners
HandshakeCompletedEvent event =
new HandshakeCompletedEvent(this, sslSession);
for (HandshakeCompletedListener listener : listeners) {
try {
listener.handshakeCompleted(event);
} catch (RuntimeException e) {
// The RI runs the handlers in a separate thread,
// which we do not. But we try to preserve their
// behavior of logging a problem and not killing
// the handshaking thread just because a listener
// has a problem.
Thread thread = Thread.currentThread();
thread.getUncaughtExceptionHandler().uncaughtException(thread, e);
}
}
}
}
示例3: handshakeCompleted
import javax.net.ssl.HandshakeCompletedListener; //导入方法依赖的package包/类
public void handshakeCompleted() {
if(listenerList.isEmpty()) {
return;
}
final HandshakeCompletedEvent event = new HandshakeCompletedEvent(this, engine.getSession());
for(HandshakeCompletedListener listener: listenerList) {
listener.handshakeCompleted(event);
}
}
示例4: startHandshake
import javax.net.ssl.HandshakeCompletedListener; //导入方法依赖的package包/类
@Override
public void startHandshake() throws IOException {
Log.d(TAG, "SSLSocket.startHandshake");
EidTlsClient client = new EidTlsClient(eidService, host, port);
tlsClientProtocol.connect(client);
this.session = new EidSSLSession(client);
for (HandshakeCompletedListener listener : listeners) {
listener.handshakeCompleted(new HandshakeCompletedEvent(this, this.session));
}
}
示例5: startHandshake
import javax.net.ssl.HandshakeCompletedListener; //导入方法依赖的package包/类
@Override
public void startHandshake() throws IOException {
for (HandshakeCompletedListener listener : listeners) {
if (this.listeners != null) {
listener.handshakeCompleted(null);
} else {
throw new Error(
"should not be here, at MockHandshake.startHandshake()");
}
}
}
示例6: invokeHandshakeListeners
import javax.net.ssl.HandshakeCompletedListener; //导入方法依赖的package包/类
private void invokeHandshakeListeners() {
final HandshakeCompletedEvent event = new HandshakeCompletedEvent(this, getSession());
for (HandshakeCompletedListener listener : new ArrayList<>(handshakeCompletedListenerList)) {
listener.handshakeCompleted(event);
}
}