Package org.apache.jmeter.util
Class SlowSSLSocket
java.lang.Object
java.net.Socket
javax.net.ssl.SSLSocket
org.apache.jmeter.util.SlowSSLSocket
- All Implemented Interfaces:
Closeable,AutoCloseable
"Slow" SSLsocket implementation to emulate dial-up modems etc
WARNING: the class relies on overriding all superclass methods in order to apply them to the input socket.
Any missing methods will access the superclass socket, which will probably be in the wrong state.
-
Constructor Summary
ConstructorsConstructorDescriptionSlowSSLSocket(SSLSocket sock, int cps) Wrap an SSLSocket with slow input and output streams -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidbind(SocketAddress bindpoint) voidclose()voidconnect(SocketAddress endpoint) voidconnect(SocketAddress endpoint, int timeout) String[]String[]booleanbooleanintbooleanbooleanintgetPort()intbooleanintintintString[]String[]booleanintbooleanbooleanbooleanisBound()booleanisClosed()booleanbooleanbooleanvoidvoidsendUrgentData(int data) voidsetEnabledCipherSuites(String[] arg0) voidsetEnabledProtocols(String[] arg0) voidsetEnableSessionCreation(boolean arg0) voidsetKeepAlive(boolean on) voidsetNeedClientAuth(boolean arg0) voidsetOOBInline(boolean on) voidsetReceiveBufferSize(int size) voidsetReuseAddress(boolean on) voidsetSendBufferSize(int size) voidsetSoLinger(boolean on, int linger) voidsetSoTimeout(int timeout) voidsetTcpNoDelay(boolean on) voidsetTrafficClass(int tc) voidsetUseClientMode(boolean arg0) voidsetWantClientAuth(boolean arg0) voidvoidvoidtoString()Methods inherited from class javax.net.ssl.SSLSocket
getApplicationProtocol, getHandshakeApplicationProtocol, getHandshakeApplicationProtocolSelector, getHandshakeSession, getSSLParameters, setHandshakeApplicationProtocolSelector, setSSLParametersMethods inherited from class java.net.Socket
getOption, setOption, setPerformancePreferences, setSocketImplFactory, supportedOptions
-
Constructor Details
-
SlowSSLSocket
Wrap an SSLSocket with slow input and output streams- Parameters:
sock- SSLSocket to be wrappedcps- characters per second to emulate
-
-
Method Details
-
getOutputStream
- Overrides:
getOutputStreamin classSocket- Throws:
IOException
-
getInputStream
- Overrides:
getInputStreamin classSocket- Throws:
IOException
-
addHandshakeCompletedListener
- Specified by:
addHandshakeCompletedListenerin classSSLSocket
-
getEnableSessionCreation
public boolean getEnableSessionCreation()- Specified by:
getEnableSessionCreationin classSSLSocket
-
getEnabledCipherSuites
- Specified by:
getEnabledCipherSuitesin classSSLSocket
-
getEnabledProtocols
- Specified by:
getEnabledProtocolsin classSSLSocket
-
getNeedClientAuth
public boolean getNeedClientAuth()- Specified by:
getNeedClientAuthin classSSLSocket
-
getSession
- Specified by:
getSessionin classSSLSocket
-
getSupportedCipherSuites
- Specified by:
getSupportedCipherSuitesin classSSLSocket
-
getSupportedProtocols
- Specified by:
getSupportedProtocolsin classSSLSocket
-
getUseClientMode
public boolean getUseClientMode()- Specified by:
getUseClientModein classSSLSocket
-
getWantClientAuth
public boolean getWantClientAuth()- Specified by:
getWantClientAuthin classSSLSocket
-
removeHandshakeCompletedListener
- Specified by:
removeHandshakeCompletedListenerin classSSLSocket
-
setEnableSessionCreation
public void setEnableSessionCreation(boolean arg0) - Specified by:
setEnableSessionCreationin classSSLSocket
-
setEnabledCipherSuites
- Specified by:
setEnabledCipherSuitesin classSSLSocket
-
setEnabledProtocols
- Specified by:
setEnabledProtocolsin classSSLSocket
-
setNeedClientAuth
public void setNeedClientAuth(boolean arg0) - Specified by:
setNeedClientAuthin classSSLSocket
-
setUseClientMode
public void setUseClientMode(boolean arg0) - Specified by:
setUseClientModein classSSLSocket
-
setWantClientAuth
public void setWantClientAuth(boolean arg0) - Specified by:
setWantClientAuthin classSSLSocket
-
startHandshake
- Specified by:
startHandshakein classSSLSocket- Throws:
IOException
-
bind
- Overrides:
bindin classSocket- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classSocket- Throws:
IOException
-
connect
- Overrides:
connectin classSocket- Throws:
IOException
-
connect
- Overrides:
connectin classSocket- Throws:
IOException
-
getChannel
- Overrides:
getChannelin classSocket
-
getInetAddress
- Overrides:
getInetAddressin classSocket
-
getKeepAlive
- Overrides:
getKeepAlivein classSocket- Throws:
SocketException
-
getLocalAddress
- Overrides:
getLocalAddressin classSocket
-
getLocalPort
public int getLocalPort()- Overrides:
getLocalPortin classSocket
-
getLocalSocketAddress
- Overrides:
getLocalSocketAddressin classSocket
-
getOOBInline
- Overrides:
getOOBInlinein classSocket- Throws:
SocketException
-
getPort
public int getPort() -
getReceiveBufferSize
- Overrides:
getReceiveBufferSizein classSocket- Throws:
SocketException
-
getRemoteSocketAddress
- Overrides:
getRemoteSocketAddressin classSocket
-
getReuseAddress
- Overrides:
getReuseAddressin classSocket- Throws:
SocketException
-
getSendBufferSize
- Overrides:
getSendBufferSizein classSocket- Throws:
SocketException
-
getSoLinger
- Overrides:
getSoLingerin classSocket- Throws:
SocketException
-
getSoTimeout
- Overrides:
getSoTimeoutin classSocket- Throws:
SocketException
-
getTcpNoDelay
- Overrides:
getTcpNoDelayin classSocket- Throws:
SocketException
-
getTrafficClass
- Overrides:
getTrafficClassin classSocket- Throws:
SocketException
-
isBound
public boolean isBound() -
isClosed
public boolean isClosed() -
isConnected
public boolean isConnected()- Overrides:
isConnectedin classSocket
-
isInputShutdown
public boolean isInputShutdown()- Overrides:
isInputShutdownin classSocket
-
isOutputShutdown
public boolean isOutputShutdown()- Overrides:
isOutputShutdownin classSocket
-
sendUrgentData
- Overrides:
sendUrgentDatain classSocket- Throws:
IOException
-
setKeepAlive
- Overrides:
setKeepAlivein classSocket- Throws:
SocketException
-
setOOBInline
- Overrides:
setOOBInlinein classSocket- Throws:
SocketException
-
setReceiveBufferSize
- Overrides:
setReceiveBufferSizein classSocket- Throws:
SocketException
-
setReuseAddress
- Overrides:
setReuseAddressin classSocket- Throws:
SocketException
-
setSendBufferSize
- Overrides:
setSendBufferSizein classSocket- Throws:
SocketException
-
setSoLinger
- Overrides:
setSoLingerin classSocket- Throws:
SocketException
-
setSoTimeout
- Overrides:
setSoTimeoutin classSocket- Throws:
SocketException
-
setTcpNoDelay
- Overrides:
setTcpNoDelayin classSocket- Throws:
SocketException
-
setTrafficClass
- Overrides:
setTrafficClassin classSocket- Throws:
SocketException
-
shutdownInput
- Overrides:
shutdownInputin classSocket- Throws:
IOException
-
shutdownOutput
- Overrides:
shutdownOutputin classSocket- Throws:
IOException
-
toString
-