public class HostnameVerifyingListener extends Object implements HandshakeCompletedListener
Modifier and Type | Field and Description |
---|---|
private String |
hostname
Hostname used in verification.
|
private HostnameVerifier |
hostnameVerifier
Hostname verifier invoked when the handshake completes.
|
private boolean |
invoked
Whether this listener has been invoked.
|
protected Logger |
logger
Logger for this class.
|
private boolean |
verified
Whether hostname verification succeeded.
|
Constructor and Description |
---|
HostnameVerifyingListener(HostnameVerifier verifier)
Creates a new verifying handshake completed listener.
|
HostnameVerifyingListener(HostnameVerifier verifier,
String name)
Creates a new verifying handshake completed listener.
|
Modifier and Type | Method and Description |
---|---|
void |
handshakeCompleted(HandshakeCompletedEvent event) |
void |
peerVerified()
Throws exception if hostname verification failed.
|
protected final Logger logger
private final HostnameVerifier hostnameVerifier
private boolean invoked
private boolean verified
private String hostname
public HostnameVerifyingListener(HostnameVerifier verifier)
verifier
- hostname verifierpublic HostnameVerifyingListener(HostnameVerifier verifier, String name)
verifier
- hostname verifiername
- hostname to verifypublic void handshakeCompleted(HandshakeCompletedEvent event)
handshakeCompleted
in interface HandshakeCompletedListener
public void peerVerified() throws SSLPeerUnverifiedException
IllegalStateException
- if this listener has not been invokedSSLPeerUnverifiedException
- if the hostname failed to verifyCopyright © 2003-2019 Virginia Tech. All Rights Reserved.