net.sf.sdedit.server
Class Receiver

java.lang.Object
  extended by net.sf.sdedit.server.Receiver
All Implemented Interfaces:
Runnable

public class Receiver
extends Object
implements Runnable

A Receiver receives a diagram specification through a TCP socket. The received code will be entered into the text area of some tab in the UserInterface.

Author:
Markus Strauch

Constructor Summary
Receiver(Editor editor, String tabTitle, BufferedReader reader, Socket socket)
          Creates a new Receiver.
 
Method Summary
 void run()
          Calls readLine on the socket's reader, collects the received lines and notifies the waiter each time a new line has been received.
 void shutDown()
          Closes the socket of this Receiver.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Receiver

public Receiver(Editor editor,
                String tabTitle,
                BufferedReader reader,
                Socket socket)
Creates a new Receiver.

Parameters:
editor - the control editor
tabTitle - the name of the title where the code that is received through the socket is to be entered
reader - a reader for the socket's input stream, ready to read
socket - the socket
Method Detail

shutDown

public void shutDown()
Closes the socket of this Receiver.


run

public void run()
Calls readLine on the socket's reader, collects the received lines and notifies the waiter each time a new line has been received.

Specified by:
run in interface Runnable


Copyright © 2011. All Rights Reserved.