peer2me.network.bluetooth
Class BluetoothNode

java.lang.Object
  extended by peer2me.network.NetworkNode
      extended by peer2me.network.bluetooth.BluetoothNode

public class BluetoothNode
extends NetworkNode

This class is used to represent a remote Bluetooth device. This class extends NetworkNode and contains information such as address, name, connectionURL, pingConnectionURL and a RemoteDevice representation of the remote Bluetooth device

Author:
Kim Saxlund

Constructor Summary
BluetoothNode(javax.bluetooth.LocalDevice localDevice)
          Constructor.
BluetoothNode(javax.bluetooth.RemoteDevice remoteDevice)
          Constructor.
BluetoothNode(javax.bluetooth.RemoteDevice remoteDevice, java.lang.String connectionURL, java.lang.String pingConnectionURL, java.lang.String name)
          Constructor.
 
Method Summary
 java.lang.Class getObjectClass()
          Returns the runtime class of object.
 java.lang.String getObjectType()
          Returns the value of the toString() method of the local variable object
 java.lang.String getPingConnectionURL()
          Gets the url that other nodes must use to ping the BluetoothNode
 void setConnectionURL(java.lang.String connectionURL)
          Sets the connectionURL of the BluetoothNode
 void setPingConnectionURL(java.lang.String pingConnectionURL)
          Sets the url that other nodes must use to ping the BluetoothNode
 java.lang.String toString()
          Returns a neat string that can look something like this: "W800i at A154BC579E05"
 
Methods inherited from class peer2me.network.NetworkNode
getAddress, getConnectionURL, getName, getObject
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BluetoothNode

public BluetoothNode(javax.bluetooth.RemoteDevice remoteDevice)
Constructor. Used when the framework needs to create an instance of BluetoothNode of a remote node after it has been found during a regular service search.

Parameters:
remoteDevice - The RemoteDevice that will be represented by this BluetoothNode

BluetoothNode

public BluetoothNode(javax.bluetooth.RemoteDevice remoteDevice,
                     java.lang.String connectionURL,
                     java.lang.String pingConnectionURL,
                     java.lang.String name)
Constructor. Used when the framework needs to create an instance of BluetoothNode of a remote node A based on information received from a remote node B.

Parameters:
remoteDevice - The RemoteDevice that will be represented by this BluetoothNode
connectionURL - The connectionURL of the BluetoothNode
pingConnectionURL - The pingConnectionURL of the BluetoothNode
name - The name of the BluetoothNode

BluetoothNode

public BluetoothNode(javax.bluetooth.LocalDevice localDevice)
Constructor. Used when the framework needs to create an instance of BluetoothNode of the local node for different purposes.

Parameters:
localDevice - The local node
Method Detail

getObjectClass

public java.lang.Class getObjectClass()
Returns the runtime class of object. That Class object is the object that is locked by static synchronized methods of the represented class.

Returns:
The runtime class of object

getObjectType

public java.lang.String getObjectType()
Returns the value of the toString() method of the local variable object

Returns:
The value of the toString() method of the local variable object

toString

public java.lang.String toString()
Returns a neat string that can look something like this: "W800i at A154BC579E05"

Specified by:
toString in class NetworkNode
Returns:
String A String describig the node

setConnectionURL

public void setConnectionURL(java.lang.String connectionURL)
Sets the connectionURL of the BluetoothNode

Parameters:
connectionURL - The connectionURL

getPingConnectionURL

public java.lang.String getPingConnectionURL()
Gets the url that other nodes must use to ping the BluetoothNode

Returns:
The pingConnectionURL

setPingConnectionURL

public void setPingConnectionURL(java.lang.String pingConnectionURL)
Sets the url that other nodes must use to ping the BluetoothNode

Parameters:
pingConnectionURL - The pingConnectionURL