|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
peer2me.network.bluetooth.BluetoothSearcher
public class BluetoothSearcher
The purpose of this class is to search for nearby Bluetooth devices that runs the same application as the local node.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary |
---|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
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 |
Method Summary | |
---|---|
void |
deviceDiscovered(javax.bluetooth.RemoteDevice remoteDevice,
javax.bluetooth.DeviceClass deviceClass)
Required method from DiscoveryListener. |
void |
distributeNodeInformation()
Distributes information about all the found nodes. |
void |
inquiryCompleted(int returnValue)
Required method from DiscoveryListener. |
void |
search()
Starts a search for other Bluetooth devices. |
void |
servicesDiscovered(int transID,
javax.bluetooth.ServiceRecord[] serviceRecords)
Required method from DiscoveryListener. |
void |
serviceSearchCompleted(int transID,
int respCode)
Required method from DiscoveryListener. |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public void search()
public void deviceDiscovered(javax.bluetooth.RemoteDevice remoteDevice, javax.bluetooth.DeviceClass deviceClass)
deviceDiscovered
in interface javax.bluetooth.DiscoveryListener
deviceClass
- The type of Bluetooth device that was discoveredremoteDevice
- A representation of the devicepublic void inquiryCompleted(int returnValue)
inquiryCompleted
in interface javax.bluetooth.DiscoveryListener
public void servicesDiscovered(int transID, javax.bluetooth.ServiceRecord[] serviceRecords)
BluetoothNode
will be created
to represent the device and the node is added to the local group. The
FrameworkSubscriber.nodeDiscovered(Node)
is also invoked, informing the application about the discovered device.
servicesDiscovered
in interface javax.bluetooth.DiscoveryListener
serviceRecords
- The services that were found on the devicetransID
- The transaction ID of the service search that is posting the resultpublic void serviceSearchCompleted(int transID, int respCode)
FrameworkSubscriber.searchCompleted()
is invoked. The ping is also activated
serviceSearchCompleted
in interface javax.bluetooth.DiscoveryListener
transID
- The transaction ID identifying the request which initiated the service searchrespCode
- The response code that indicates the status of the transactionpublic void distributeNodeInformation()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |