org.apache.jmeter.util

Class 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

Method Summary

void
addHandshakeCompletedListener(HandshakeCompletedListener arg0)
void
bind(SocketAddress bindpoint)
void
close()
void
connect(SocketAddress endpoint)
void
connect(SocketAddress endpoint, int timeout)
SocketChannel
getChannel()
boolean
getEnableSessionCreation()
String[]
getEnabledCipherSuites()
String[]
getEnabledProtocols()
InetAddress
getInetAddress()
InputStream
getInputStream()
boolean
getKeepAlive()
InetAddress
getLocalAddress()
int
getLocalPort()
SocketAddress
getLocalSocketAddress()
boolean
getNeedClientAuth()
boolean
getOOBInline()
OutputStream
getOutputStream()
int
getPort()
int
getReceiveBufferSize()
SocketAddress
getRemoteSocketAddress()
boolean
getReuseAddress()
int
getSendBufferSize()
SSLSession
getSession()
int
getSoLinger()
int
getSoTimeout()
String[]
getSupportedCipherSuites()
String[]
getSupportedProtocols()
boolean
getTcpNoDelay()
int
getTrafficClass()
boolean
getUseClientMode()
boolean
getWantClientAuth()
boolean
isBound()
boolean
isClosed()
boolean
isConnected()
boolean
isInputShutdown()
boolean
isOutputShutdown()
void
removeHandshakeCompletedListener(HandshakeCompletedListener arg0)
void
sendUrgentData(int data)
void
setEnableSessionCreation(boolean arg0)
void
setEnabledCipherSuites(String[] arg0)
void
setEnabledProtocols(String[] arg0)
void
setKeepAlive(boolean on)
void
setNeedClientAuth(boolean arg0)
void
setOOBInline(boolean on)
void
setReceiveBufferSize(int size)
void
setReuseAddress(boolean on)
void
setSendBufferSize(int size)
void
setSoLinger(boolean on, int linger)
void
setSoTimeout(int timeout)
void
setTcpNoDelay(boolean on)
void
setTrafficClass(int tc)
void
setUseClientMode(boolean arg0)
void
setWantClientAuth(boolean arg0)
void
shutdownInput()
void
shutdownOutput()
void
startHandshake()
String
toString()

Constructor Details

SlowSSLSocket

public SlowSSLSocket(SSLSocket sock,
                     int cps)
Wrap an SSLSocket with slow input and output streams
Parameters:
sock - SSLSocket to be wrapped
cps - characters per second to emulate

Method Details

addHandshakeCompletedListener

public void addHandshakeCompletedListener(HandshakeCompletedListener arg0)

bind

public void bind(SocketAddress bindpoint)
            throws IOException

close

public void close()
            throws IOException

connect

public void connect(SocketAddress endpoint)
            throws IOException

connect

public void connect(SocketAddress endpoint,
                    int timeout)
            throws IOException

getChannel

public SocketChannel getChannel()

getEnableSessionCreation

public boolean getEnableSessionCreation()

getEnabledCipherSuites

public String[] getEnabledCipherSuites()

getEnabledProtocols

public String[] getEnabledProtocols()

getInetAddress

public InetAddress getInetAddress()

getInputStream

public InputStream getInputStream()
            throws IOException

getKeepAlive

public boolean getKeepAlive()
            throws SocketException

getLocalAddress

public InetAddress getLocalAddress()

getLocalPort

public int getLocalPort()

getLocalSocketAddress

public SocketAddress getLocalSocketAddress()

getNeedClientAuth

public boolean getNeedClientAuth()

getOOBInline

public boolean getOOBInline()
            throws SocketException

getOutputStream

public OutputStream getOutputStream()
            throws IOException

getPort

public int getPort()

getReceiveBufferSize

public int getReceiveBufferSize()
            throws SocketException

getRemoteSocketAddress

public SocketAddress getRemoteSocketAddress()

getReuseAddress

public boolean getReuseAddress()
            throws SocketException

getSendBufferSize

public int getSendBufferSize()
            throws SocketException

getSession

public SSLSession getSession()

getSoLinger

public int getSoLinger()
            throws SocketException

getSoTimeout

public int getSoTimeout()
            throws SocketException

getSupportedCipherSuites

public String[] getSupportedCipherSuites()

getSupportedProtocols

public String[] getSupportedProtocols()

getTcpNoDelay

public boolean getTcpNoDelay()
            throws SocketException

getTrafficClass

public int getTrafficClass()
            throws SocketException

getUseClientMode

public boolean getUseClientMode()

getWantClientAuth

public boolean getWantClientAuth()

isBound

public boolean isBound()

isClosed

public boolean isClosed()

isConnected

public boolean isConnected()

isInputShutdown

public boolean isInputShutdown()

isOutputShutdown

public boolean isOutputShutdown()

removeHandshakeCompletedListener

public void removeHandshakeCompletedListener(HandshakeCompletedListener arg0)

sendUrgentData

public void sendUrgentData(int data)
            throws IOException

setEnableSessionCreation

public void setEnableSessionCreation(boolean arg0)

setEnabledCipherSuites

public void setEnabledCipherSuites(String[] arg0)

setEnabledProtocols

public void setEnabledProtocols(String[] arg0)

setKeepAlive

public void setKeepAlive(boolean on)
            throws SocketException

setNeedClientAuth

public void setNeedClientAuth(boolean arg0)

setOOBInline

public void setOOBInline(boolean on)
            throws SocketException

setReceiveBufferSize

public void setReceiveBufferSize(int size)
            throws SocketException

setReuseAddress

public void setReuseAddress(boolean on)
            throws SocketException

setSendBufferSize

public void setSendBufferSize(int size)
            throws SocketException

setSoLinger

public void setSoLinger(boolean on,
                        int linger)
            throws SocketException

setSoTimeout

public void setSoTimeout(int timeout)
            throws SocketException

setTcpNoDelay

public void setTcpNoDelay(boolean on)
            throws SocketException

setTrafficClass

public void setTrafficClass(int tc)
            throws SocketException

setUseClientMode

public void setUseClientMode(boolean arg0)

setWantClientAuth

public void setWantClientAuth(boolean arg0)

shutdownInput

public void shutdownInput()
            throws IOException

shutdownOutput

public void shutdownOutput()
            throws IOException

startHandshake

public void startHandshake()
            throws IOException

toString

public String toString()

Copyright © 1998-2010 Apache Software Foundation. All Rights Reserved.