Package org.robolectric.shadows
Class ShadowBluetoothServerSocket
java.lang.Object
org.robolectric.shadows.ShadowBluetoothServerSocket
@Implements(android.bluetooth.BluetoothServerSocket.class)
public class ShadowBluetoothServerSocket
extends Object
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected BluetoothSocketaccept(int timeout) May block the current thread and wait untilBluetoothDeviceis offered viadeviceConnected(BluetoothDevice)method or timeout occurred.protected voidclose()deviceConnected(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- 
ShadowBluetoothServerSocketpublic ShadowBluetoothServerSocket()
 
- 
- 
Method Details- 
newInstancepublic static BluetoothServerSocket newInstance(int type, boolean auth, boolean encrypt, ParcelUuid uuid) 
- 
acceptMay 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
 
- 
deviceConnectedCreatesBluetoothSocketfor the given device and makes this socket available immediately in theaccept(int)method.
 
-