|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ch.aplu.bluetooth.BluetoothClient
public class BluetoothClient
Class to create a client that connects to a server via Bluetooth. The server's Bluetooth name has to be added manually to the known Bluetooth device list using the Lejos command processor. Keep in mind that a server must be up and running before any client can connect.
Constructor Summary | |
---|---|
BluetoothClient()
|
|
BluetoothClient(java.lang.String serverName)
Creates a BluetoothClient instance for the given server's Bluetooth name that will connect to channel 1. |
Method Summary | |
---|---|
boolean |
connect()
Connects the client to the host. |
void |
disconnect()
If connected, closes input and output streams and releases the Bluetooth communication. |
java.io.InputStream |
getInputStream()
|
java.io.OutputStream |
getOutputStream()
|
int |
getSignalStrength()
Get the signal strength of the connection. |
boolean |
isConnected()
Returns the connection state. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BluetoothClient()
public BluetoothClient(java.lang.String serverName)
Method Detail |
---|
public boolean connect()
public void disconnect()
public boolean isConnected()
public java.io.InputStream getInputStream()
public java.io.OutputStream getOutputStream()
public int getSignalStrength()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |