Package org.robolectric.shadows
Class ShadowBluetoothServerSocket
java.lang.Object
org.robolectric.shadows.ShadowBluetoothServerSocket
@Implements(android.bluetooth.BluetoothServerSocket.class) public class ShadowBluetoothServerSocket extends Object
- 
Constructor Summary
Constructors Constructor Description ShadowBluetoothServerSocket() - 
Method Summary
Modifier and Type Method Description protected BluetoothSocketaccept(int timeout)May block the current thread and wait untilBluetoothDeviceis offered viadeviceConnected(BluetoothDevice)method or timeout occurred.protected voidclose()BluetoothSocketdeviceConnected(BluetoothDevice device)CreatesBluetoothSocketfor the given device and makes this socket available immediately in theaccept(int)method.static BluetoothServerSocketnewInstance(int type, boolean auth, boolean encrypt, ParcelUuid uuid) 
- 
Constructor Details
- 
ShadowBluetoothServerSocket
public ShadowBluetoothServerSocket() 
 - 
 - 
Method Details
- 
newInstance
public static BluetoothServerSocket newInstance(int type, boolean auth, boolean encrypt, ParcelUuid uuid) - 
accept
May block the current thread and wait untilBluetoothDeviceis offered viadeviceConnected(BluetoothDevice)method or timeout occurred.- Returns:
 - socket of the connected bluetooth device
 - Throws:
 IOException- if socket has been closed, thread interrupted while waiting or timeout has occurred.
 - 
close
- Throws:
 IOException
 - 
deviceConnected
CreatesBluetoothSocketfor the given device and makes this socket available immediately in theaccept(int)method. 
 -