public class MockDTLSClient extends DefaultTlsClient
Modifier and Type | Field and Description |
---|---|
protected TlsSession |
session |
cipherFactory, clientECPointFormats, context, namedCurves, selectedCipherSuite, selectedCompressionMethod, serverECPointFormats, supportedSignatureAlgorithms
Constructor and Description |
---|
MockDTLSClient(TlsSession session) |
Modifier and Type | Method and Description |
---|---|
TlsAuthentication |
getAuthentication() |
java.util.Hashtable |
getClientExtensions() |
ProtocolVersion |
getClientVersion() |
ProtocolVersion |
getMinimumVersion() |
TlsSession |
getSessionToResume()
Return the session this client wants to resume, if any.
|
void |
notifyAlertRaised(short alertLevel,
short alertDescription,
java.lang.String message,
java.lang.Throwable cause)
This method will be called when an alert is raised by the protocol.
|
void |
notifyAlertReceived(short alertLevel,
short alertDescription)
This method will be called when an alert is received from the remote peer.
|
void |
notifyHandshakeComplete()
Notifies the peer that the handshake has been successfully completed.
|
void |
notifyServerVersion(ProtocolVersion serverVersion) |
createDHEKeyExchange, createDHKeyExchange, createECDHEKeyExchange, createECDHKeyExchange, createRSAKeyExchange, getCipherSuites, getKeyExchange
allowUnexpectedServerExtension, checkForUnexpectedServerExtension, getCipher, getClientHelloRecordLayerVersion, getClientSupplementalData, getCompression, getCompressionMethods, init, isFallback, notifyNewSessionTicket, notifySelectedCipherSuite, notifySelectedCompressionMethod, notifySessionID, processServerExtensions, processServerSupplementalData
notifySecureRenegotiation, shouldUseGMTUnixTime
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
notifySecureRenegotiation, shouldUseGMTUnixTime
protected TlsSession session
public MockDTLSClient(TlsSession session)
public TlsSession getSessionToResume()
TlsClient
getSessionToResume
in interface TlsClient
getSessionToResume
in class AbstractTlsClient
TlsSession
representing the resumable session to be used for this
connection, or null to use a new session.SessionParameters.getPeerCertificate()
public void notifyAlertRaised(short alertLevel, short alertDescription, java.lang.String message, java.lang.Throwable cause)
TlsPeer
notifyAlertRaised
in interface TlsPeer
notifyAlertRaised
in class AbstractTlsPeer
alertLevel
- AlertLevel
alertDescription
- AlertDescription
message
- A human-readable message explaining what caused this alert. May be null.cause
- The Throwable
that caused this alert to be raised. May be null.public void notifyAlertReceived(short alertLevel, short alertDescription)
TlsPeer
notifyAlertReceived
in interface TlsPeer
notifyAlertReceived
in class AbstractTlsPeer
alertLevel
- AlertLevel
alertDescription
- AlertDescription
public ProtocolVersion getClientVersion()
getClientVersion
in interface TlsClient
getClientVersion
in class AbstractTlsClient
public ProtocolVersion getMinimumVersion()
getMinimumVersion
in class AbstractTlsClient
public java.util.Hashtable getClientExtensions() throws java.io.IOException
getClientExtensions
in interface TlsClient
getClientExtensions
in class AbstractTlsClient
java.io.IOException
public void notifyServerVersion(ProtocolVersion serverVersion) throws java.io.IOException
notifyServerVersion
in interface TlsClient
notifyServerVersion
in class AbstractTlsClient
java.io.IOException
public TlsAuthentication getAuthentication() throws java.io.IOException
java.io.IOException
public void notifyHandshakeComplete() throws java.io.IOException
TlsPeer
notifyHandshakeComplete
in interface TlsPeer
notifyHandshakeComplete
in class AbstractTlsPeer
java.io.IOException