Package com.mockobjects.net
Class MockSocket
java.lang.Object
com.mockobjects.MockObject
com.mockobjects.net.MockSocket
- All Implemented Interfaces:
Socket,Verifiable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()booleanintintgetPort()intintintintbooleanvoidsetExpectedCloseCalls(int aCount) voidsetExpectedSoTimeout(int aSoTimeout) voidsetKeepAlive(boolean on) voidsetReceiveBufferSize(int size) voidsetSendBufferSize(int size) voidsetSoLinger(boolean on, int linger) voidsetSoTimeout(int aSoTimeout) voidsetTcpNoDelay(boolean on) voidsetupGetInputStream(InputStream anInputStream) voidsetupGetOutputStream(OutputStream anOutputStream) voidvoidMethods inherited from class com.mockobjects.MockObject
notImplemented, notYetImplemented, verify
-
Constructor Details
-
MockSocket
public MockSocket()
-
-
Method Details
-
getInetAddress
- Specified by:
getInetAddressin interfaceSocket
-
getLocalAddress
- Specified by:
getLocalAddressin interfaceSocket
-
getPort
public int getPort() -
getLocalPort
public int getLocalPort()- Specified by:
getLocalPortin interfaceSocket
-
setupGetInputStream
-
getInputStream
- Specified by:
getInputStreamin interfaceSocket- Throws:
IOException
-
setupGetOutputStream
-
getOutputStream
- Specified by:
getOutputStreamin interfaceSocket- Throws:
IOException
-
setTcpNoDelay
- Specified by:
setTcpNoDelayin interfaceSocket- Throws:
SocketException
-
getTcpNoDelay
- Specified by:
getTcpNoDelayin interfaceSocket- Throws:
SocketException
-
setSoLinger
- Specified by:
setSoLingerin interfaceSocket- Throws:
SocketException
-
getSoLinger
- Specified by:
getSoLingerin interfaceSocket- Throws:
SocketException
-
setExpectedSoTimeout
public void setExpectedSoTimeout(int aSoTimeout) -
setSoTimeout
- Specified by:
setSoTimeoutin interfaceSocket- Throws:
SocketException
-
getSoTimeout
- Specified by:
getSoTimeoutin interfaceSocket- Throws:
SocketException
-
setSendBufferSize
- Specified by:
setSendBufferSizein interfaceSocket- Throws:
SocketException
-
getSendBufferSize
- Specified by:
getSendBufferSizein interfaceSocket- Throws:
SocketException
-
setReceiveBufferSize
- Specified by:
setReceiveBufferSizein interfaceSocket- Throws:
SocketException
-
getReceiveBufferSize
- Specified by:
getReceiveBufferSizein interfaceSocket- Throws:
SocketException
-
setKeepAlive
- Specified by:
setKeepAlivein interfaceSocket- Throws:
SocketException
-
getKeepAlive
- Specified by:
getKeepAlivein interfaceSocket- Throws:
SocketException
-
setExpectedCloseCalls
public void setExpectedCloseCalls(int aCount) -
close
- Specified by:
closein interfaceSocket- Throws:
IOException
-
shutdownInput
- Specified by:
shutdownInputin interfaceSocket- Throws:
IOException
-
shutdownOutput
- Specified by:
shutdownOutputin interfaceSocket- Throws:
IOException
-