feud.clientserver
Interface DataTransferListener

All Known Implementing Classes:
BlueThunderClient, BlueThunderServer

public interface DataTransferListener

A DataTransferListener can be added to a client or to a server. It will be notified if data has been received.


Method Summary
 DataContainer[] dataReceived(DataContainer data, int messageType)
          Data has been received by the server/client to which this listener has been added.
 void dataReceivedEnd()
          The server/client has finished receiving in this transfer.
 

Method Detail

dataReceived

public DataContainer[] dataReceived(DataContainer data,
                                    int messageType)
Data has been received by the server/client to which this listener has been added. This method will be called for each DataContainer. A transfer can consist of many DataContainers.

Parameters:
data - the DataContainer that has been received.
messageType - the type of the message like MessageType defines it
Returns:
DataContainer[] an optional result. The client doesn't care for this result. The server will send it back to the client from which is has received the data.

dataReceivedEnd

public void dataReceivedEnd()
The server/client has finished receiving in this transfer. This method will be called once after receiving all data, while the one above can be called multiple times while receiving.