peer2me.network.bluetooth
Class BluetoothPingListener

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

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

This class creates and opens up a connection so that other devices can establish a connection. The connections are only used to see if the local node is alive. No data is ever transferred on this connection

Author:
Kim Saxlund

Constructor Summary
BluetoothPingListener(Bluetooth bluetooth, Service service)
          Constructor that sets some local variables and starts the thread
 
Method Summary
 void run()
          Opens up a connection.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BluetoothPingListener

public BluetoothPingListener(Bluetooth bluetooth,
                             Service service)
Constructor that sets some local variables and starts the thread

Parameters:
bluetooth - A reference to Bluetooth, which created an instance of this class
service - The service contains necessary information to open up a connection
Method Detail

run

public void run()
Opens up a connection. If someone connects, it creates an instance of BluetoothConnectionHandler which is assositated with the connection. It will not open up a new connection until the current connection is closed.

Specified by:
run in interface java.lang.Runnable