com.mockobjects.net
Class MockSocket
java.lang.Object
com.mockobjects.MockObject
com.mockobjects.net.MockSocket
- All Implemented Interfaces:
- Socket, Verifiable
- public class MockSocket
- extends MockObject
- implements Socket
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MockSocket
public MockSocket()
getInetAddress
public java.net.InetAddress getInetAddress()
- Specified by:
getInetAddress
in interface Socket
getLocalAddress
public java.net.InetAddress getLocalAddress()
- Specified by:
getLocalAddress
in interface Socket
getPort
public int getPort()
- Specified by:
getPort
in interface Socket
getLocalPort
public int getLocalPort()
- Specified by:
getLocalPort
in interface Socket
setupGetInputStream
public void setupGetInputStream(java.io.InputStream anInputStream)
getInputStream
public java.io.InputStream getInputStream()
throws java.io.IOException
- Specified by:
getInputStream
in interface Socket
- Throws:
java.io.IOException
setupGetOutputStream
public void setupGetOutputStream(java.io.OutputStream anOutputStream)
getOutputStream
public java.io.OutputStream getOutputStream()
throws java.io.IOException
- Specified by:
getOutputStream
in interface Socket
- Throws:
java.io.IOException
setTcpNoDelay
public void setTcpNoDelay(boolean on)
throws java.net.SocketException
- Specified by:
setTcpNoDelay
in interface Socket
- Throws:
java.net.SocketException
getTcpNoDelay
public boolean getTcpNoDelay()
throws java.net.SocketException
- Specified by:
getTcpNoDelay
in interface Socket
- Throws:
java.net.SocketException
setSoLinger
public void setSoLinger(boolean on,
int linger)
throws java.net.SocketException
- Specified by:
setSoLinger
in interface Socket
- Throws:
java.net.SocketException
getSoLinger
public int getSoLinger()
throws java.net.SocketException
- Specified by:
getSoLinger
in interface Socket
- Throws:
java.net.SocketException
setExpectedSoTimeout
public void setExpectedSoTimeout(int aSoTimeout)
setSoTimeout
public void setSoTimeout(int aSoTimeout)
throws java.net.SocketException
- Specified by:
setSoTimeout
in interface Socket
- Throws:
java.net.SocketException
getSoTimeout
public int getSoTimeout()
throws java.net.SocketException
- Specified by:
getSoTimeout
in interface Socket
- Throws:
java.net.SocketException
setSendBufferSize
public void setSendBufferSize(int size)
throws java.net.SocketException
- Specified by:
setSendBufferSize
in interface Socket
- Throws:
java.net.SocketException
getSendBufferSize
public int getSendBufferSize()
throws java.net.SocketException
- Specified by:
getSendBufferSize
in interface Socket
- Throws:
java.net.SocketException
setReceiveBufferSize
public void setReceiveBufferSize(int size)
throws java.net.SocketException
- Specified by:
setReceiveBufferSize
in interface Socket
- Throws:
java.net.SocketException
getReceiveBufferSize
public int getReceiveBufferSize()
throws java.net.SocketException
- Specified by:
getReceiveBufferSize
in interface Socket
- Throws:
java.net.SocketException
setKeepAlive
public void setKeepAlive(boolean on)
throws java.net.SocketException
- Specified by:
setKeepAlive
in interface Socket
- Throws:
java.net.SocketException
getKeepAlive
public boolean getKeepAlive()
throws java.net.SocketException
- Specified by:
getKeepAlive
in interface Socket
- Throws:
java.net.SocketException
setExpectedCloseCalls
public void setExpectedCloseCalls(int aCount)
close
public void close()
throws java.io.IOException
- Specified by:
close
in interface Socket
- Throws:
java.io.IOException
shutdownInput
public void shutdownInput()
throws java.io.IOException
- Specified by:
shutdownInput
in interface Socket
- Throws:
java.io.IOException
shutdownOutput
public void shutdownOutput()
throws java.io.IOException
- Specified by:
shutdownOutput
in interface Socket
- Throws:
java.io.IOException
Copyright © 2002 Mock Objects. All Rights Reserved.