ist.palcom.rascal
Class RascalCommunicationThread

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.rascal.RascalCommunicationThread

public class RascalCommunicationThread
extends CommunicationThread

RascalCommunicationThread is a CommunicationThread used to enable the communication between the PalCom device and the RASCAL agent. It sends and receives PalCom messages using a socket opened on localhost.


Field Summary
static int LOCAL_SOCKET_PORT
           
static int REMOTE_SOCKET_PORT
           
protected  DatagramSocket socket
           
static java.lang.String URL_PREFIX
           
 
Constructor Summary
RascalCommunicationThread(PalcomScheduler scheduler, PalcomThread distributorThread)
           
 
Method Summary
 URL getURL()
           
 void run()
          This method is overridden by subclasses.
 void setReceiveBufferSize(int size)
           
 void setSendBufferSize(int size)
           
 void stop()
           
 
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, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

URL_PREFIX

public static final java.lang.String URL_PREFIX
See Also:
Constant Field Values

LOCAL_SOCKET_PORT

public static final int LOCAL_SOCKET_PORT
See Also:
Constant Field Values

REMOTE_SOCKET_PORT

public static final int REMOTE_SOCKET_PORT
See Also:
Constant Field Values

socket

protected DatagramSocket socket
Constructor Detail

RascalCommunicationThread

public RascalCommunicationThread(PalcomScheduler scheduler,
                                 PalcomThread distributorThread)
Method Detail

stop

public void stop()

run

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

Overrides:
run in class PalcomThread

getURL

public URL getURL()
Specified by:
getURL in class CommunicationThread
Returns:
The URL for sending messages to this thread, a URL this thread listens at (protocol-specific URL).

setReceiveBufferSize

public void setReceiveBufferSize(int size)
                          throws java.io.IOException
Throws:
java.io.IOException

setSendBufferSize

public void setSendBufferSize(int size)
                       throws java.io.IOException
Throws:
java.io.IOException