ist.palcom.mal.bt
Class BluetoothCommunicationThread

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.bt.BluetoothCommunicationThread

public class BluetoothCommunicationThread
extends CommunicationThread

This class implements ist.palcom.mal.BluetoothCommunicationThread BluetoothCommunicationThread is a CommunicationThread for Bluetooth communication. It sends an receives on one Bluetooth socket and is thus the rfcomm connection to a specific host

See Also:
CommunicationThread

Field Summary
protected  BluetoothSocket socket
           
protected static java.lang.String URL_PREFIX
           
 
Constructor Summary
protected BluetoothCommunicationThread(PalcomScheduler scheduler, PalcomThread distributor, BluetoothSocket socket)
           
protected BluetoothCommunicationThread(PalcomScheduler scheduler, PalcomThread distributor, java.lang.String URL)
           
 
Method Summary
 URL getURL()
           
 void run()
          This method is overridden by subclasses.
protected  void setUp()
          Perform socket set-up if needed.
protected  void tearDown()
          Close socket if needed.
 
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

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

socket

protected BluetoothSocket socket
Constructor Detail

BluetoothCommunicationThread

protected BluetoothCommunicationThread(PalcomScheduler scheduler,
                                       PalcomThread distributor,
                                       java.lang.String URL)
                                throws java.io.IOException
Throws:
java.io.IOException

BluetoothCommunicationThread

protected BluetoothCommunicationThread(PalcomScheduler scheduler,
                                       PalcomThread distributor,
                                       BluetoothSocket socket)
Method Detail

setUp

protected void setUp()
Perform socket set-up if needed.


tearDown

protected void tearDown()
Close socket if needed.


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).