edu.UCL.xmiddle.framework.controller
Interface Sender

All Known Implementing Classes:
UDPSender

public interface Sender

Sender.java A Sender is a networking component used by the Protocol sessions to send data to a specific host (or perhaps group of hosts). It also includes method to send the data segmented at a defined segment size Created: Fri Jul 20 14:04:58 2001


Method Summary
 void close()
          closes the connection
 int getSegment()
          Gets the maximum segment size (in bytes)
 boolean rawSend(Data data)
          Sends the given data without negotiating any packet information
 boolean send(Data data)
          Sends the given packet to the host.
 void setSegment(int size)
          Set the maximum segment size using which the packet will be segmented.
 

Method Detail

send

public boolean send(Data data)
Sends the given packet to the host.

Parameters:
data - the packet to be sent
Returns:
true if succedded, false otherwise

setSegment

public void setSegment(int size)
Set the maximum segment size using which the packet will be segmented.

Parameters:
size - The maximum segment size in bytes.

getSegment

public int getSegment()
Gets the maximum segment size (in bytes)

Returns:
the maximum segment size (in bytes)

close

public void close()
closes the connection


rawSend

public boolean rawSend(Data data)
Sends the given data without negotiating any packet information

Parameters:
data - The text to send
Returns:
true if the data were sent successfuly or false otherwise