BluetoothClient Class Reference

Collaboration diagram for BluetoothClient:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 BluetoothClient (StreamConnection conn, String clientQuestions, String bluetoothAddress, String friendlyName)
void run ()

Private Attributes

RemoteDevice r
StreamConnection conn
DataOutputStream out
DataInputStream in
String vote
String voteAgain
GUI g
Database d
String clientQuestions
String bluetoothAddress
String friendlyName

Detailed Description

The BluetoothClient class represents the actions carried out by a single client device.

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

Definition at line 11 of file BluetoothClient.java.


Constructor & Destructor Documentation

BluetoothClient.BluetoothClient StreamConnection  conn,
String  clientQuestions,
String  bluetoothAddress,
String  friendlyName
 

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

Parameters:
conn The connection to the client device.
clientQuestions The encoded list of questions available to the connected client device.
bluetoothAddress The bluetooth address of the client device.
friendlyName The friendly name of the client device.
See also:
GUI.getInstance

Database.getInstance

Definition at line 39 of file BluetoothClient.java.

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

Here is the call graph for this function:


Member Function Documentation

void BluetoothClient.run  ) 
 

Seperate thread which communicates with the client device. The encoded list of questions is sent to the client, and the vote response is received and saved. Votes are saved until the user either disconnects, selects they don't wish to vote again, or run out of questions to vote on.

See also:
Database.saveVote

Definition at line 62 of file BluetoothClient.java.

References bluetoothAddress, clientQuestions, conn, d, friendlyName, g, in, out, Database.saveVote(), GUI.traceMessage(), vote, and voteAgain.

Here is the call graph for this function:


Member Data Documentation

String BluetoothClient.bluetoothAddress [private]
 

Definition at line 23 of file BluetoothClient.java.

Referenced by run().

String BluetoothClient.clientQuestions [private]
 

Definition at line 22 of file BluetoothClient.java.

Referenced by run().

StreamConnection BluetoothClient.conn [private]
 

Definition at line 15 of file BluetoothClient.java.

Referenced by run().

Database BluetoothClient.d [private]
 

Definition at line 21 of file BluetoothClient.java.

Referenced by BluetoothClient(), and run().

String BluetoothClient.friendlyName [private]
 

Definition at line 24 of file BluetoothClient.java.

Referenced by run().

GUI BluetoothClient.g [private]
 

Definition at line 20 of file BluetoothClient.java.

Referenced by BluetoothClient(), and run().

DataInputStream BluetoothClient.in [private]
 

Definition at line 17 of file BluetoothClient.java.

Referenced by run().

DataOutputStream BluetoothClient.out [private]
 

Definition at line 16 of file BluetoothClient.java.

Referenced by run().

RemoteDevice BluetoothClient.r [private]
 

Definition at line 14 of file BluetoothClient.java.

String BluetoothClient.vote [private]
 

Definition at line 18 of file BluetoothClient.java.

Referenced by run().

String BluetoothClient.voteAgain [private]
 

Definition at line 19 of file BluetoothClient.java.

Referenced by run().


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