peer2me.network.bluetooth
Class MessageQueueProcessor

java.lang.Object
  extended by peer2me.network.bluetooth.MessageQueueProcessor
All Implemented Interfaces:
java.lang.Runnable

public class MessageQueueProcessor
extends java.lang.Object
implements java.lang.Runnable

This class processes the messagequeue that is located in Bluetooth. This class constantly watches the queue, and when a message is added to the queue, this class retrieves the message and sends the message through BluetoothObjectPush

Author:
Kim Saxlund

Method Summary
 boolean isProcessQueue()
          If the queue is being checked at regular intervals, this method returns true
 void run()
          Runs as long as the private boolean processQueue is true.
 void setProcessQueue(boolean processQue)
          Can be used to stop this thread.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

run

public void run()
Runs as long as the private boolean processQueue is true. Checks the message queue at regular intervals. When a message appears, this method creates an instance of BluetoothObjectPush which sends the message

Specified by:
run in interface java.lang.Runnable

isProcessQueue

public boolean isProcessQueue()
If the queue is being checked at regular intervals, this method returns true

Returns:
True if queue is being checked, false otherwise

setProcessQueue

public void setProcessQueue(boolean processQue)
Can be used to stop this thread. Use 'false' as parameter, and this thread will stop checking the queue, and finish

Parameters:
processQue - Use false to stop checking the queue