@Implements(value=android.bluetooth.BluetoothServerSocket.class) public class ShadowBluetoothServerSocket extends Object
Constructor and Description |
---|
ShadowBluetoothServerSocket() |
Modifier and Type | Method and Description |
---|---|
protected BluetoothSocket |
accept(int timeout)
May block the current thread and wait until
BluetoothDevice is offered via deviceConnected(BluetoothDevice) method or timeout occurred. |
protected void |
close() |
BluetoothSocket |
deviceConnected(BluetoothDevice device)
Creates
BluetoothSocket for the given device and makes this socket available immediately in the accept(int) method. |
static BluetoothServerSocket |
newInstance(int type,
boolean auth,
boolean encrypt,
ParcelUuid uuid) |
public static BluetoothServerSocket newInstance(int type, boolean auth, boolean encrypt, ParcelUuid uuid)
@Implementation protected BluetoothSocket accept(int timeout) throws IOException
May block the current thread and wait until BluetoothDevice
is offered via deviceConnected(BluetoothDevice)
method or timeout occurred.
IOException
- if socket has been closed, thread interrupted while waiting or timeout has occurred.@Implementation protected void close() throws IOException
IOException
public BluetoothSocket deviceConnected(BluetoothDevice device)
Creates BluetoothSocket
for the given device and makes this socket available immediately in the accept(int)
method.