ist.palcom.mal
Class UDPCommunicationThread

java.lang.Object
  extended by ist.palcom.palcomthreads.PalcomThread
      extended by ist.palcom.palcomthreads.PalcomPriorityThread
          extended by ist.palcom.mal.CommunicationThread
              extended by ist.palcom.mal.UDPCommunicationThread
Direct Known Subclasses:
UDPMulticastCommunicationThread, UDPUnicastCommunicationThread

public abstract class UDPCommunicationThread
extends CommunicationThread

UDPCommunicationThread is a CommunicationThread for UDP communication. It sends an receives on one socket (the concrete subclasses handle different kinds of UDP sockets).

See Also:
CommunicationThread

Field Summary
protected  DatagramSocket socket
           
protected static String URL_PREFIX
           
 
Constructor Summary
protected UDPCommunicationThread(PalcomScheduler scheduler, PalcomThread distributor, DatagramSocket socket)
           
 
Method Summary
 int getReceiveBufferSize()
           
 int getSendBufferSize()
           
 void run()
          This method is overridden by subclasses.
 void setReceiveBufferSize(int size)
           
 void setSendBufferSize(int size)
           
protected  void tearDown()
          Close socket if needed.
 
Methods inherited from class ist.palcom.mal.CommunicationThread
getURL
 
Methods inherited from class ist.palcom.palcomthreads.PalcomPriorityThread
getPriority, setPriority
 
Methods inherited from class ist.palcom.palcomthreads.PalcomThread
askEvent, disableIOEvents, disablePeriodicEvents, enableIOEvent, enablePeriodicEvents, getScheduler, putEvent, terminate, waitEvent, yield
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, println, toString
 

Field Detail

URL_PREFIX

protected static final String URL_PREFIX
See Also:
Constant Field Values

socket

protected DatagramSocket socket
Constructor Detail

UDPCommunicationThread

protected UDPCommunicationThread(PalcomScheduler scheduler,
                                 PalcomThread distributor,
                                 DatagramSocket socket)
Method Detail

tearDown

protected void tearDown()
Close socket if needed.


getReceiveBufferSize

public int getReceiveBufferSize()
                         throws IOException
Throws:
IOException

getSendBufferSize

public int getSendBufferSize()
                      throws IOException
Throws:
IOException

setReceiveBufferSize

public void setReceiveBufferSize(int size)
                          throws IOException
Throws:
IOException

setSendBufferSize

public void setSendBufferSize(int size)
                       throws IOException
Throws:
IOException

run

public void run()
Description copied from class: PalcomThread
This method is overridden by subclasses.

Overrides:
run in class PalcomThread