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 TypeMethodDescriptionvoid
close()
boolean
int
int
getPort()
int
int
int
int
boolean
void
setExpectedCloseCalls
(int aCount) void
setExpectedSoTimeout
(int aSoTimeout) void
setKeepAlive
(boolean on) void
setReceiveBufferSize
(int size) void
setSendBufferSize
(int size) void
setSoLinger
(boolean on, int linger) void
setSoTimeout
(int aSoTimeout) void
setTcpNoDelay
(boolean on) void
setupGetInputStream
(InputStream anInputStream) void
setupGetOutputStream
(OutputStream anOutputStream) void
void
Methods inherited from class com.mockobjects.MockObject
notImplemented, notYetImplemented, verify
-
Constructor Details
-
MockSocket
public MockSocket()
-
-
Method Details
-
getInetAddress
- Specified by:
getInetAddress
in interfaceSocket
-
getLocalAddress
- Specified by:
getLocalAddress
in interfaceSocket
-
getPort
public int getPort() -
getLocalPort
public int getLocalPort()- Specified by:
getLocalPort
in interfaceSocket
-
setupGetInputStream
-
getInputStream
- Specified by:
getInputStream
in interfaceSocket
- Throws:
IOException
-
setupGetOutputStream
-
getOutputStream
- Specified by:
getOutputStream
in interfaceSocket
- Throws:
IOException
-
setTcpNoDelay
- Specified by:
setTcpNoDelay
in interfaceSocket
- Throws:
SocketException
-
getTcpNoDelay
- Specified by:
getTcpNoDelay
in interfaceSocket
- Throws:
SocketException
-
setSoLinger
- Specified by:
setSoLinger
in interfaceSocket
- Throws:
SocketException
-
getSoLinger
- Specified by:
getSoLinger
in interfaceSocket
- Throws:
SocketException
-
setExpectedSoTimeout
public void setExpectedSoTimeout(int aSoTimeout) -
setSoTimeout
- Specified by:
setSoTimeout
in interfaceSocket
- Throws:
SocketException
-
getSoTimeout
- Specified by:
getSoTimeout
in interfaceSocket
- Throws:
SocketException
-
setSendBufferSize
- Specified by:
setSendBufferSize
in interfaceSocket
- Throws:
SocketException
-
getSendBufferSize
- Specified by:
getSendBufferSize
in interfaceSocket
- Throws:
SocketException
-
setReceiveBufferSize
- Specified by:
setReceiveBufferSize
in interfaceSocket
- Throws:
SocketException
-
getReceiveBufferSize
- Specified by:
getReceiveBufferSize
in interfaceSocket
- Throws:
SocketException
-
setKeepAlive
- Specified by:
setKeepAlive
in interfaceSocket
- Throws:
SocketException
-
getKeepAlive
- Specified by:
getKeepAlive
in interfaceSocket
- Throws:
SocketException
-
setExpectedCloseCalls
public void setExpectedCloseCalls(int aCount) -
close
- Specified by:
close
in interfaceSocket
- Throws:
IOException
-
shutdownInput
- Specified by:
shutdownInput
in interfaceSocket
- Throws:
IOException
-
shutdownOutput
- Specified by:
shutdownOutput
in interfaceSocket
- Throws:
IOException
-