peer2me.network.bluetooth
Class BluetoothObjectPush

java.lang.Object
  extended by peer2me.network.bluetooth.BluetoothObjectPush

public class BluetoothObjectPush
extends java.lang.Object

This class does the actual connecting and sending of data to a remote device. This class is used by MessageQueueProcessor and PingQueueProcessor

Author:
Kim Saxlund

Method Summary
 void closeConnection()
          Closes the connection that was created by connect(String).
 boolean connect(java.lang.String connectionURL)
          Tries to create a connection to another Bluetooth device.
 void sendMessage(Message message)
          Sends the message given as parameter.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

connect

public boolean connect(java.lang.String connectionURL)
Tries to create a connection to another Bluetooth device.

Parameters:
connectionURL - The connectionURL that is used to establish a connection
Returns:
True if a connection could be established, false otherwise

closeConnection

public void closeConnection()
Closes the connection that was created by connect(String).


sendMessage

public void sendMessage(Message message)
Sends the message given as parameter. The recipiencts of the message lies in the message itself. First it will invoke connect(String), and if a connection is established, it will send the message.

Parameters:
message - The message to be sent