|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.intel.bluetooth.RemoteDeviceHelper
public abstract class RemoteDeviceHelper
Implementation of RemoteDevice. Instance of RemoteDevice can be created by User. BlueCove should use only RemoteDeviceHelper class to create RemoteDevice instances.
Your application should not use this class directly. The only exception is method authenticate(RemoteDevice device, String passkey).
| Method Summary | |
|---|---|
static boolean |
authenticate(RemoteDevice device)
Attempts to authenticate RemoteDevice. |
static boolean |
authenticate(RemoteDevice device,
String passkey)
Sends an authentication request to a remote Bluetooth device. |
static boolean |
authorize(RemoteDevice device,
Connection conn)
Determines if this RemoteDevice should be allowed to continue to access the local service provided by the Connection. |
static int |
connectedDevices()
Count number of device that have open connections to or from them. |
static boolean |
encrypt(RemoteDevice device,
Connection conn,
boolean on)
Attempts to turn encryption on or off for an existing connection. |
static String |
formatBluetoothAddress(String address)
|
static long |
getAddress(String bluetoothAddress)
|
static String |
getBluetoothAddress(long address)
|
static String |
getFriendlyName(RemoteDevice device,
long address,
boolean alwaysAsk)
|
static RemoteDevice |
getRemoteDevice(Connection conn)
|
static boolean |
isAuthenticated(RemoteDevice device)
Determines if this RemoteDevice has been authenticated. |
static boolean |
isAuthorized(RemoteDevice device,
Connection conn)
|
static boolean |
isEncrypted(RemoteDevice device)
Determines if data exchanges with this RemoteDevice are
currently being encrypted. |
static boolean |
isTrustedDevice(RemoteDevice device)
|
static int |
openConnections()
Count total number of open connections to all devices. |
static int |
openConnections(long address)
Count number of open connections to or from specific device. |
static RemoteDevice[] |
retrieveDevices(BluetoothStack bluetoothStack,
int option)
(non-Javadoc) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static String getFriendlyName(RemoteDevice device,
long address,
boolean alwaysAsk)
throws IOException
IOException
public static RemoteDevice getRemoteDevice(Connection conn)
throws IOException
IOExceptionRemoteDevice.getRemoteDevice(Connection)
public static RemoteDevice[] retrieveDevices(BluetoothStack bluetoothStack,
int option)
DiscoveryAgent.retrieveDevices(int)public static int openConnections()
public static int openConnections(long address)
public static int connectedDevices()
public static String formatBluetoothAddress(String address)
public static String getBluetoothAddress(long address)
public static long getAddress(String bluetoothAddress)
public static boolean authenticate(RemoteDevice device)
throws IOException
false if the
stack does not support authentication.
IOExceptionRemoteDevice.authenticate()
public static boolean authenticate(RemoteDevice device,
String passkey)
throws IOException
false if the stack does not support authentication.
PUBLIC JSR-82 extension
device - Remote Devicepasskey - A Personal Identification Number (PIN) to be used for device
authentication.
true if authentication is successful; otherwise
false
IOException - if there are error during authentication.
public static boolean authorize(RemoteDevice device,
Connection conn)
throws IOException
IOExceptionRemoteDevice.authorize(javax.microedition.io.Connection)
public static boolean encrypt(RemoteDevice device,
Connection conn,
boolean on)
throws IOException
IOExceptionRemoteDevice.encrypt(javax.microedition.io.Connection,
boolean)public static boolean isAuthenticated(RemoteDevice device)
RemoteDevice has been authenticated.
A device may have been authenticated by this application or another
application. Authentication applies to an ACL link between devices and
not on a specific L2CAP, RFCOMM, or OBEX connection. Therefore, if
authenticate() is performed when an L2CAP connection is
made to device A, then isAuthenticated() may return
true when tested as part of making an RFCOMM connection to
device A.
true if this RemoteDevice has
previously been authenticated; false if it has not
been authenticated or there are no open connections between the
local device and this RemoteDevice
public static boolean isAuthorized(RemoteDevice device,
Connection conn)
throws IOException
IOExceptionpublic static boolean isEncrypted(RemoteDevice device)
RemoteDevice are
currently being encrypted.
Encryption may have been previously turned on by this or another
application. Encryption applies to an ACL link between devices and not on
a specific L2CAP, RFCOMM, or OBEX connection. Therefore, if
encrypt() is performed with the on
parameter set to true when an L2CAP connection is made to
device A, then isEncrypted() may return true
when tested as part of making an RFCOMM connection to device A.
true if data exchanges with this
RemoteDevice are being encrypted;
false if they are not being encrypted, or there
are no open connections between the local device and this
RemoteDevicepublic static boolean isTrustedDevice(RemoteDevice device)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||