BluetoothConnectionListener Class Reference

Collaboration diagram for BluetoothConnectionListener:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 BluetoothConnectionListener ()
void run ()

Static Public Member Functions

static BluetoothConnectionListener getInstance ()

Private Attributes

final UUID SERVICE_UUID
final String URL
StreamConnectionNotifier notifier
StreamConnection conn
GUI g
Database d

Static Private Attributes

static BluetoothConnectionListener instance = null

Detailed Description

The BluetoothConnectionListener class listens for incoming connections from client devices.

Author:
Nick Day, "UniVote" Final Year Project, Lancaster University

Definition at line 11 of file BluetoothConnectionListener.java.


Constructor & Destructor Documentation

BluetoothConnectionListener.BluetoothConnectionListener  ) 
 

Instantiates this class by getting the instances of the GUI and Database classes.

See also:
GUI.getInstance

Database.getInstance

Definition at line 49 of file BluetoothConnectionListener.java.

References d, g, Database.getInstance(), and GUI.getInstance().

Referenced by getInstance().

Here is the call graph for this function:


Member Function Documentation

static BluetoothConnectionListener BluetoothConnectionListener.getInstance  )  [static]
 

Enforces the Singleton pattern to ensure only a single instance of this class exists. Returns the instance of this class if it is instantiated, otherwise it returns a new instantiation of this class.

Returns:
An instance of this class.

Definition at line 32 of file BluetoothConnectionListener.java.

References BluetoothConnectionListener(), and instance.

Here is the call graph for this function:

void BluetoothConnectionListener.run  ) 
 

Seperate thread which continuously looks for incoming connections. Once a new connection is received, its questions are retrieved from the Database and passed to a new instance of the BluetoothClient class.

See also:
Database.getQuestions

BluetoothClient

Definition at line 67 of file BluetoothConnectionListener.java.

References conn, d, g, Database.getQuestions(), notifier, GUI.traceMessage(), and URL.

Here is the call graph for this function:


Member Data Documentation

StreamConnection BluetoothConnectionListener.conn [private]
 

Definition at line 20 of file BluetoothConnectionListener.java.

Referenced by run().

Database BluetoothConnectionListener.d [private]
 

Definition at line 22 of file BluetoothConnectionListener.java.

Referenced by BluetoothConnectionListener(), and run().

GUI BluetoothConnectionListener.g [private]
 

Definition at line 21 of file BluetoothConnectionListener.java.

Referenced by BluetoothConnectionListener(), and run().

BluetoothConnectionListener BluetoothConnectionListener.instance = null [static, private]
 

Definition at line 14 of file BluetoothConnectionListener.java.

Referenced by getInstance().

StreamConnectionNotifier BluetoothConnectionListener.notifier [private]
 

Definition at line 19 of file BluetoothConnectionListener.java.

Referenced by run().

final UUID BluetoothConnectionListener.SERVICE_UUID [private]
 

Initial value:

 new UUID
                ("00112233445566778899AABBCCDDEEFF", false)

Definition at line 15 of file BluetoothConnectionListener.java.

final String BluetoothConnectionListener.URL [private]
 

Initial value:

 "btspp://localhost:" + 
                SERVICE_UUID.toString() + ";master=true"

Definition at line 17 of file BluetoothConnectionListener.java.

Referenced by run().


The documentation for this class was generated from the following file:
Generated on Mon Mar 13 22:04:03 2006 for UniVote Server Application by  doxygen 1.4.6