Class ShadowBluetoothServerSocket


  • @Implements(android.bluetooth.BluetoothServerSocket.class)
    public class ShadowBluetoothServerSocket
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected android.bluetooth.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()  
      android.bluetooth.BluetoothSocket deviceConnected​(android.bluetooth.BluetoothDevice device)
      Creates BluetoothSocket for the given device and makes this socket available immediately in the accept(int) method.
      static android.bluetooth.BluetoothServerSocket newInstance​(int type, boolean auth, boolean encrypt, android.os.ParcelUuid uuid)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ShadowBluetoothServerSocket

        public ShadowBluetoothServerSocket()
    • Method Detail

      • newInstance

        public static android.bluetooth.BluetoothServerSocket newInstance​(int type,
                                                                          boolean auth,
                                                                          boolean encrypt,
                                                                          android.os.ParcelUuid uuid)
      • accept

        @Implementation
        protected android.bluetooth.BluetoothSocket accept​(int timeout)
                                                    throws java.io.IOException
        May block the current thread and wait until BluetoothDevice is offered via deviceConnected(BluetoothDevice) method or timeout occurred.
        Returns:
        socket of the connected bluetooth device
        Throws:
        java.io.IOException - if socket has been closed, thread interrupted while waiting or timeout has occurred.
      • close

        @Implementation
        protected void close()
                      throws java.io.IOException
        Throws:
        java.io.IOException
      • deviceConnected

        public android.bluetooth.BluetoothSocket deviceConnected​(android.bluetooth.BluetoothDevice device)
        Creates BluetoothSocket for the given device and makes this socket available immediately in the accept(int) method.