keepalive.socket.sim
Class SimHost

java.lang.Object
  |
  +--keepalive.socket.sim.SimHost
All Implemented Interfaces:
keepalive.socket.sim.Pluggable

public class SimHost
extends java.lang.Object
implements keepalive.socket.sim.Pluggable

A simulated host (computer on the network).


Constructor Summary
SimHost(boolean serverSide)
          Create a new host, indicating whether it is to act as a server.
 
Method Summary
 java.lang.String getReport()
          Get a report on the state of the sockets on this host.
 boolean isPluggedIn()
          Find if this host is plugged in.
 boolean isServerSide()
          Find whether this host is acting as a server.
 void setPluggedIn(boolean b)
          Plug this host in or unplug it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimHost

public SimHost(boolean serverSide)
Create a new host, indicating whether it is to act as a server.
Parameters:
serverSide -  
Method Detail

getReport

public java.lang.String getReport()
Get a report on the state of the sockets on this host.
Returns:
the report

isServerSide

public boolean isServerSide()
Find whether this host is acting as a server.

isPluggedIn

public boolean isPluggedIn()
Find if this host is plugged in.
Specified by:
isPluggedIn in interface keepalive.socket.sim.Pluggable
Returns:
true if this host is plugged in.

setPluggedIn

public void setPluggedIn(boolean b)
Plug this host in or unplug it.
Specified by:
setPluggedIn in interface keepalive.socket.sim.Pluggable
Parameters:
b - true to plug this host in; false to unplug it.


© 2000 Joshua Fox