org.apache.jmeter.util
Class SlowSSLSocket
java.lang.Object
java.net.Socket
javax.net.ssl.SSLSocket
org.apache.jmeter.util.SlowSSLSocket
- public class SlowSSLSocket
- extends SSLSocket
"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 |
SlowSSLSocket(SSLSocket sock,
int cps)
Wrap an SSLSocket with slow input and output streams |
SlowSSLSocket
public SlowSSLSocket(SSLSocket sock,
int cps)
- Wrap an SSLSocket with slow input and output streams
- Parameters:
sock
- SSLSocket to be wrappedcps
- characters per second to emulate
getOutputStream
public OutputStream getOutputStream()
throws IOException
- Throws:
IOException
getInputStream
public InputStream getInputStream()
throws IOException
- Throws:
IOException
addHandshakeCompletedListener
public void addHandshakeCompletedListener(HandshakeCompletedListener arg0)
getEnableSessionCreation
public boolean getEnableSessionCreation()
getEnabledCipherSuites
public String[] getEnabledCipherSuites()
getEnabledProtocols
public String[] getEnabledProtocols()
getNeedClientAuth
public boolean getNeedClientAuth()
getSession
public SSLSession getSession()
getSupportedCipherSuites
public String[] getSupportedCipherSuites()
getSupportedProtocols
public String[] getSupportedProtocols()
getUseClientMode
public boolean getUseClientMode()
getWantClientAuth
public boolean getWantClientAuth()
removeHandshakeCompletedListener
public void removeHandshakeCompletedListener(HandshakeCompletedListener arg0)
setEnableSessionCreation
public void setEnableSessionCreation(boolean arg0)
setEnabledCipherSuites
public void setEnabledCipherSuites(String[] arg0)
setEnabledProtocols
public void setEnabledProtocols(String[] arg0)
setNeedClientAuth
public void setNeedClientAuth(boolean arg0)
setUseClientMode
public void setUseClientMode(boolean arg0)
setWantClientAuth
public void setWantClientAuth(boolean arg0)
startHandshake
public void startHandshake()
throws IOException
- Throws:
IOException
bind
public void bind(SocketAddress bindpoint)
throws IOException
- Throws:
IOException
close
public void close()
throws IOException
- Throws:
IOException
connect
public void connect(SocketAddress endpoint,
int timeout)
throws IOException
- Throws:
IOException
connect
public void connect(SocketAddress endpoint)
throws IOException
- Throws:
IOException
getChannel
public SocketChannel getChannel()
getInetAddress
public InetAddress getInetAddress()
getKeepAlive
public boolean getKeepAlive()
throws SocketException
- Throws:
SocketException
getLocalAddress
public InetAddress getLocalAddress()
getLocalPort
public int getLocalPort()
getLocalSocketAddress
public SocketAddress getLocalSocketAddress()
getOOBInline
public boolean getOOBInline()
throws SocketException
- Throws:
SocketException
getPort
public int getPort()
getReceiveBufferSize
public int getReceiveBufferSize()
throws SocketException
- Throws:
SocketException
getRemoteSocketAddress
public SocketAddress getRemoteSocketAddress()
getReuseAddress
public boolean getReuseAddress()
throws SocketException
- Throws:
SocketException
getSendBufferSize
public int getSendBufferSize()
throws SocketException
- Throws:
SocketException
getSoLinger
public int getSoLinger()
throws SocketException
- Throws:
SocketException
getSoTimeout
public int getSoTimeout()
throws SocketException
- Throws:
SocketException
getTcpNoDelay
public boolean getTcpNoDelay()
throws SocketException
- Throws:
SocketException
getTrafficClass
public int getTrafficClass()
throws SocketException
- Throws:
SocketException
isBound
public boolean isBound()
isClosed
public boolean isClosed()
isConnected
public boolean isConnected()
isInputShutdown
public boolean isInputShutdown()
isOutputShutdown
public boolean isOutputShutdown()
sendUrgentData
public void sendUrgentData(int data)
throws IOException
- Throws:
IOException
setKeepAlive
public void setKeepAlive(boolean on)
throws SocketException
- Throws:
SocketException
setOOBInline
public void setOOBInline(boolean on)
throws SocketException
- Throws:
SocketException
setReceiveBufferSize
public void setReceiveBufferSize(int size)
throws SocketException
- Throws:
SocketException
setReuseAddress
public void setReuseAddress(boolean on)
throws SocketException
- Throws:
SocketException
setSendBufferSize
public void setSendBufferSize(int size)
throws SocketException
- Throws:
SocketException
setSoLinger
public void setSoLinger(boolean on,
int linger)
throws SocketException
- Throws:
SocketException
setSoTimeout
public void setSoTimeout(int timeout)
throws SocketException
- Throws:
SocketException
setTcpNoDelay
public void setTcpNoDelay(boolean on)
throws SocketException
- Throws:
SocketException
setTrafficClass
public void setTrafficClass(int tc)
throws SocketException
- Throws:
SocketException
shutdownInput
public void shutdownInput()
throws IOException
- Throws:
IOException
shutdownOutput
public void shutdownOutput()
throws IOException
- Throws:
IOException
toString
public String toString()
Copyright © 1998-2009 Apache Software Foundation. All Rights Reserved.