keepalive.socket.sim
Class SimSocket

java.lang.Object
  |
  +--keepalive.socket.AbstractSocket
        |
        +--keepalive.socket.sim.SimSocket

public class SimSocket
extends AbstractSocket

A simulated socket, within a single VM.


Constructor Summary
SimSocket(int port)
          Connects to a SimServerSocket from Client side
SimSocket(SimSocket theOtherOne)
          Use this when a SimSocket is spun off from a SimServerSocket.
 
Method Summary
 void closeSocket()
          Close this socket.
 java.io.InputStream getInputStream()
          Get the input stream associated with this simulated socket.
 java.io.OutputStream getOutputStream()
          Get the output stream associated with this simulated socket.
 boolean isPluggedIn()
          Whether this simulated socket's host is "plugged-in."
 java.lang.String toString()
           
 
Methods inherited from class keepalive.socket.AbstractSocket
close, startKeepAlive
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimSocket

public SimSocket(int port)
          throws java.io.IOException
Connects to a SimServerSocket from Client side

SimSocket

public SimSocket(SimSocket theOtherOne)
          throws java.io.IOException
Use this when a SimSocket is spun off from a SimServerSocket.
Method Detail

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Get the input stream associated with this simulated socket.
Overrides:
getInputStream in class AbstractSocket
Throws:
java.io.IOException -  

getOutputStream

public java.io.OutputStream getOutputStream()
                                     throws java.io.IOException
Get the output stream associated with this simulated socket.
Overrides:
getOutputStream in class AbstractSocket
Throws:
java.io.IOException -  

closeSocket

public void closeSocket()
                 throws java.io.IOException
Close this socket. This method is a hook method called by close() in the abstract superclass.
Overrides:
closeSocket in class AbstractSocket
Throws:
java.io.IOException -  

isPluggedIn

public boolean isPluggedIn()
Whether this simulated socket's host is "plugged-in."
Returns:
true iff this simulated socket's host is "plugged-in."

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


© 2000 Joshua Fox