org.inria.myriads.snoozenode.tcpip
Class TCPDataReceiver

java.lang.Object
  extended by org.inria.myriads.snoozenode.tcpip.TCPDataReceiver
All Implemented Interfaces:
Runnable
Direct Known Subclasses:
GroupManagerSummaryReceiver, LocalControllerSummaryReceiver

public abstract class TCPDataReceiver
extends Object
implements Runnable

TCP data receiver.

Author:
Eugen Feller

Constructor Summary
TCPDataReceiver(org.inria.myriads.snoozecommon.communication.NetworkAddress networkAddress, int timeout)
          Constructor.
 
Method Summary
 void run()
          Accepts new clients and reads data.
 void setHandler(DataListener danaHandler)
          Sets the failure event handler.
 void terminate()
          Terminates the receiver.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TCPDataReceiver

public TCPDataReceiver(org.inria.myriads.snoozecommon.communication.NetworkAddress networkAddress,
                       int timeout)
                throws IOException
Constructor.

Parameters:
networkAddress - The network address
timeout - The timeout
Throws:
IOException - The I/O exception
Method Detail

setHandler

public void setHandler(DataListener danaHandler)
Sets the failure event handler.

Parameters:
danaHandler - The data handler

run

public void run()
Accepts new clients and reads data.

Specified by:
run in interface Runnable

terminate

public void terminate()
Terminates the receiver.



Copyright © 2012. All Rights Reserved.