|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectexample.bluetooth.demo.BTServiceSearcher
public class BTServiceSearcher
Facade for JSR82, connecting via the btspp
protocol.
This class simplifies searching for services on a device that
can only search for one device at the time.
It is based on the BlueToothFacade class found in the BlueGammon game.
Field Summary | |
---|---|
static java.lang.String |
BT_PROTOCOL
Protocol |
protected java.lang.Object |
DEVICE_LOCK
Device Discovery lock |
protected java.util.Vector |
m_devices
Device lookup result |
protected javax.bluetooth.ServiceRecord |
m_record
Service lookup result |
protected java.util.Hashtable |
m_servers
service id / server instance map |
protected java.lang.Object |
SERVICE_LOCK
Service Discovery lock |
Fields inherited from interface javax.bluetooth.DiscoveryListener |
---|
INQUIRY_COMPLETED, INQUIRY_ERROR, INQUIRY_TERMINATED, SERVICE_SEARCH_COMPLETED, SERVICE_SEARCH_DEVICE_NOT_REACHABLE, SERVICE_SEARCH_ERROR, SERVICE_SEARCH_NO_RECORDS, SERVICE_SEARCH_TERMINATED |
Constructor Summary | |
---|---|
BTServiceSearcher()
|
Method Summary | |
---|---|
void |
deviceDiscovered(javax.bluetooth.RemoteDevice btDevice,
javax.bluetooth.DeviceClass cod)
|
javax.bluetooth.ServiceRecord |
findServiceOnDevice(java.lang.String serviceNumber,
javax.bluetooth.RemoteDevice device)
|
javax.bluetooth.ServiceRecord |
findServiceOnDevice(java.lang.String serviceNumber,
javax.bluetooth.RemoteDevice device,
int[] attr)
|
void |
inquiryCompleted(int discType)
|
void |
servicesDiscovered(int transID,
javax.bluetooth.ServiceRecord[] records)
|
void |
serviceSearchCompleted(int transID,
int respCode)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String BT_PROTOCOL
protected java.util.Hashtable m_servers
protected final java.lang.Object DEVICE_LOCK
protected final java.lang.Object SERVICE_LOCK
protected java.util.Vector m_devices
protected javax.bluetooth.ServiceRecord m_record
Constructor Detail |
---|
public BTServiceSearcher()
Method Detail |
---|
public javax.bluetooth.ServiceRecord findServiceOnDevice(java.lang.String serviceNumber, javax.bluetooth.RemoteDevice device, int[] attr) throws java.io.IOException
java.io.IOException
public javax.bluetooth.ServiceRecord findServiceOnDevice(java.lang.String serviceNumber, javax.bluetooth.RemoteDevice device) throws java.io.IOException
java.io.IOException
public void servicesDiscovered(int transID, javax.bluetooth.ServiceRecord[] records)
servicesDiscovered
in interface javax.bluetooth.DiscoveryListener
public void serviceSearchCompleted(int transID, int respCode)
serviceSearchCompleted
in interface javax.bluetooth.DiscoveryListener
public void deviceDiscovered(javax.bluetooth.RemoteDevice btDevice, javax.bluetooth.DeviceClass cod)
deviceDiscovered
in interface javax.bluetooth.DiscoveryListener
public void inquiryCompleted(int discType)
inquiryCompleted
in interface javax.bluetooth.DiscoveryListener
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |