本文整理匯總了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);
}
}