sophware.home.net
Class NetworkHome

java.lang.Object
  extended by sophware.home.lang.Home
      extended by sophware.home.net.NetworkHome
All Implemented Interfaces:
java.io.Serializable, java.lang.Runnable

public class NetworkHome
extends Home
implements java.lang.Runnable

NetworkHome used to acceess a remote Home via a NetworkHomeServer

Version:
1.0, 03/02/07
Author:
Russell Soph
See Also:
Home, NetworkHomeServer, Serialized Form

Field Summary
 
Fields inherited from class sophware.home.lang.Home
m_database, m_errorStream, m_me, m_receiver, m_transmitter
 
Constructor Summary
NetworkHome(java.lang.String host, int port)
          Instantiates a NetworkHomeTransceiver that communicates with the given host on the given port.
 
Method Summary
 void run()
          Runnable implementation for thread that will receive HomeEvents and HomeCommandStatus from the NetworkHomeServer
 void send(java.lang.Object obj)
          Transmits the given object to the remote NetworkHomeServer
 void start()
          Starts processing of commands/events for this NetworkHomeTransceiver
 void stop()
          Stops processing of commands/events for this NetworkHomeTransceiver
 
Methods inherited from class sophware.home.lang.Home
add, addHomeListener, distribute, distribute, flush, get, get, getAll, getAll, remove, removeHomeListener, transmit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NetworkHome

public NetworkHome(java.lang.String host,
                   int port)
Instantiates a NetworkHomeTransceiver that communicates with the given host on the given port.

Parameters:
host - hostname of the remote NetworkHomeServer
port - port upon which the remote NetworkHomeServer is listening
Method Detail

start

public void start()
           throws java.io.IOException,
                  HomeException
Starts processing of commands/events for this NetworkHomeTransceiver

Overrides:
start in class Home
Throws:
java.io.IOException
HomeException

send

public void send(java.lang.Object obj)
          throws java.io.IOException
Transmits the given object to the remote NetworkHomeServer

Parameters:
obj - the Object to be transmitted
Throws:
java.io.IOException

stop

public void stop()
          throws java.io.IOException,
                 HomeException
Stops processing of commands/events for this NetworkHomeTransceiver

Overrides:
stop in class Home
Throws:
java.io.IOException
HomeException

run

public void run()
Runnable implementation for thread that will receive HomeEvents and HomeCommandStatus from the NetworkHomeServer

Specified by:
run in interface java.lang.Runnable