public class IchtyometerClient extends Object implements Closeable
| Modifier and Type | Class and Description |
|---|---|
protected static class |
IchtyometerClient.MyDiscoveryListener |
| Modifier and Type | Field and Description |
|---|---|
protected Set<javax.microedition.io.StreamConnection> |
connections
Set of opened connections.
|
protected String |
connectionUrl
Url connection to the remote device.
|
protected javax.bluetooth.LocalDevice |
localDevice
Local bluetooth device.
|
protected String |
name
Friendly name of the device.
|
protected boolean |
open
Flag set to
true if open(RemoteDeviceChooser, boolean) method was invoked with success. |
protected static Map<String,String> |
REMOTE_CONNECTION_URL_CACHE
To keep a cache of discovered connection url on remote devices.
|
protected static Map<String,javax.bluetooth.RemoteDevice> |
REMOTE_DEVICE_CACHE
To keep a cache of discovered remote device.
|
protected javax.bluetooth.RemoteDevice |
remoteDevice
Remote BigFin bluetooth device.
|
| Constructor and Description |
|---|
IchtyometerClient() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkIsOpened() |
static void |
clearRemoteDeviceCaches() |
void |
close() |
void |
closeConnection(javax.microedition.io.StreamConnection connection) |
protected Map<String,javax.bluetooth.RemoteDevice> |
discoverDevices() |
protected List<javax.bluetooth.ServiceRecord> |
discoverServiceUrls(javax.bluetooth.UUID serviceUUID,
javax.bluetooth.RemoteDevice device) |
String |
getConnectionUrl() |
String |
getName() |
static String |
getServiceName(javax.bluetooth.ServiceRecord serviceRecord) |
boolean |
isOpen() |
void |
open(RemoteDeviceChooser remoteDeviceChooser,
boolean forceCompleteScan) |
javax.microedition.io.StreamConnection |
openConnection() |
protected static Map<String,javax.bluetooth.RemoteDevice> REMOTE_DEVICE_CACHE
protected static Map<String,String> REMOTE_CONNECTION_URL_CACHE
protected javax.bluetooth.LocalDevice localDevice
protected final Set<javax.microedition.io.StreamConnection> connections
protected javax.bluetooth.RemoteDevice remoteDevice
protected String connectionUrl
protected boolean open
true if open(RemoteDeviceChooser, boolean) method was invoked with success.protected String name
public static void clearRemoteDeviceCaches()
public void open(RemoteDeviceChooser remoteDeviceChooser, boolean forceCompleteScan) throws IOException
IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic javax.microedition.io.StreamConnection openConnection()
throws IOException
IOExceptionpublic void closeConnection(javax.microedition.io.StreamConnection connection)
throws IOException
IOExceptionpublic String getConnectionUrl()
public boolean isOpen()
public String getName()
protected void checkIsOpened()
protected Map<String,javax.bluetooth.RemoteDevice> discoverDevices() throws javax.bluetooth.BluetoothStateException, InterruptedException
javax.bluetooth.BluetoothStateExceptionInterruptedExceptionprotected List<javax.bluetooth.ServiceRecord> discoverServiceUrls(javax.bluetooth.UUID serviceUUID, javax.bluetooth.RemoteDevice device) throws javax.bluetooth.BluetoothStateException, InterruptedException
javax.bluetooth.BluetoothStateExceptionInterruptedExceptionpublic static String getServiceName(javax.bluetooth.ServiceRecord serviceRecord)
Copyright © 2012–2015 Ifremer. All rights reserved.