Methods Summary |
---|
public java.lang.String | getBluetoothAddress()
return localDeviceImpl.getBluetoothAddress();
|
public DeviceClass | getDeviceClass()
return localDeviceImpl.getDeviceClass();
|
public int | getDiscoverable()
return localDeviceImpl.getDiscoverable();
|
public DiscoveryAgent | getDiscoveryAgent()
/*
* This is an only exception for the "API/IMPL wrapper"
* scheme, i.e. the DiscoveryAgent object is stored
* locally in this class.
*/
return discoveryAgent;
|
public java.lang.String | getFriendlyName()
return localDeviceImpl.getFriendlyName();
|
public static javax.bluetooth.LocalDevice | getLocalDevice()
/*
* The method is not declared as synchronized to keep
* its signature unchanged.
*/
synchronized (LocalDevice.class) {
if (localDevice == null) {
try {
// create a shared impl object and 'this'
localDevice = new LocalDevice();
/*
* create a DiscoveryAgent from here.
* This should be done one time only
* regardless whether or not the system is
* initialized for the first time.
*
* We suppose the getLocalDevice() may be called
* for the next time if the first try failed.
*/
if (localDevice.discoveryAgent == null) {
localDevice.discoveryAgent = new DiscoveryAgent();
}
/*
* Constructing LocaldeviceImpl causes initialization
* of device properties and attributes.
*/
localDeviceImpl = LocalDeviceImpl.getInstance();
} catch (BluetoothStateException bse) {
localDevice = null;
throw bse;
} catch (Throwable e) {
localDevice = null;
throw new BluetoothStateException(e.toString());
}
}
}
return localDevice;
|
public static java.lang.String | getProperty(java.lang.String property)
return localDevice != null ? localDeviceImpl.getProperty(property) :
null;
|
public ServiceRecord | getRecord(javax.microedition.io.Connection notifier)
return localDeviceImpl.getRecord(notifier);
|
public static boolean | isPowerOn()
return localDeviceImpl.isPowerOn();
|
public boolean | setDiscoverable(int mode)
return localDeviceImpl.setDiscoverable(mode);
|
public void | updateRecord(ServiceRecord srvRecord)
localDeviceImpl.updateRecord(srvRecord);
|