edu.UCL.xmiddle.framework.controller
Interface Listener

All Known Implementing Classes:
UDPListener

public interface Listener

Listener.java Listener is a basic block of the xmiddle networking architecture, used by protocol sessions to receive information from specific hosts or group of hosts. It also includes methods to define the maximum segment size of data to expect. Created: Fri Jul 20 14:13:43 2001


Method Summary
 void close()
          Closes the connection
 int getSegment()
          Retrieve the maximum segment size of bytes expected to receive as previously set.
 Data rawReceive()
          receives a packet without negotitating packet size
 Data receive()
          Receives data from the host/group of hosts
 void setSegment(int size)
          Set the maximum segment size of bytes expected to receive.
 

Method Detail

receive

public Data receive()
Receives data from the host/group of hosts

Returns:
the data received

setSegment

public void setSegment(int size)
Set the maximum segment size of bytes expected to receive.

Parameters:
size - The maximum segment size in bytes.

getSegment

public int getSegment()
Retrieve the maximum segment size of bytes expected to receive as previously set.

Returns:
The maximum segment size in bytes.

close

public void close()
Closes the connection


rawReceive

public Data rawReceive()
receives a packet without negotitating packet size

Returns:
the packet received