com.mockobjects.net

Class MockSocket

Implemented Interfaces:
Socket, Verifiable

public class MockSocket
extends MockObject
implements Socket

Method Summary

void
close()
InetAddress
getInetAddress()
InputStream
getInputStream()
boolean
getKeepAlive()
InetAddress
getLocalAddress()
int
getLocalPort()
OutputStream
getOutputStream()
int
getPort()
int
getReceiveBufferSize()
int
getSendBufferSize()
int
getSoLinger()
int
getSoTimeout()
boolean
getTcpNoDelay()
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
shutdownInput()
void
shutdownOutput()

Methods inherited from class com.mockobjects.MockObject

notImplemented, notYetImplemented, verify

Method Details

close

public void close()
            throws IOException
Specified by:
close in interface Socket

getInetAddress

public InetAddress getInetAddress()
Specified by:
getInetAddress in interface Socket

getInputStream

public InputStream getInputStream()
            throws IOException
Specified by:
getInputStream in interface Socket

getKeepAlive

public boolean getKeepAlive()
            throws SocketException
Specified by:
getKeepAlive in interface Socket

getLocalAddress

public InetAddress getLocalAddress()
Specified by:
getLocalAddress in interface Socket

getLocalPort

public int getLocalPort()
Specified by:
getLocalPort in interface Socket

getOutputStream

public OutputStream getOutputStream()
            throws IOException
Specified by:
getOutputStream in interface Socket

getPort

public int getPort()
Specified by:
getPort in interface Socket

getReceiveBufferSize

public int getReceiveBufferSize()
            throws SocketException
Specified by:
getReceiveBufferSize in interface Socket

getSendBufferSize

public int getSendBufferSize()
            throws SocketException
Specified by:
getSendBufferSize in interface Socket

getSoLinger

public int getSoLinger()
            throws SocketException
Specified by:
getSoLinger in interface Socket

getSoTimeout

public int getSoTimeout()
            throws SocketException
Specified by:
getSoTimeout in interface Socket

getTcpNoDelay

public boolean getTcpNoDelay()
            throws SocketException
Specified by:
getTcpNoDelay in interface Socket

setExpectedCloseCalls

public void setExpectedCloseCalls(int aCount)

setExpectedSoTimeout

public void setExpectedSoTimeout(int aSoTimeout)

setKeepAlive

public void setKeepAlive(boolean on)
            throws SocketException
Specified by:
setKeepAlive in interface Socket

setReceiveBufferSize

public void setReceiveBufferSize(int size)
            throws SocketException
Specified by:
setReceiveBufferSize in interface Socket

setSendBufferSize

public void setSendBufferSize(int size)
            throws SocketException
Specified by:
setSendBufferSize in interface Socket

setSoLinger

public void setSoLinger(boolean on,
                        int linger)
            throws SocketException
Specified by:
setSoLinger in interface Socket

setSoTimeout

public void setSoTimeout(int aSoTimeout)
            throws SocketException
Specified by:
setSoTimeout in interface Socket

setTcpNoDelay

public void setTcpNoDelay(boolean on)
            throws SocketException
Specified by:
setTcpNoDelay in interface Socket

setupGetInputStream

public void setupGetInputStream(InputStream anInputStream)

setupGetOutputStream

public void setupGetOutputStream(OutputStream anOutputStream)

shutdownInput

public void shutdownInput()
            throws IOException
Specified by:
shutdownInput in interface Socket

shutdownOutput

public void shutdownOutput()
            throws IOException
Specified by:
shutdownOutput in interface Socket

Copyright © 2002 Mock Objects. All Rights Reserved.