TransportHandle.ReceiveCallback
  public
  static
  
  
  interface
  TransportHandle.ReceiveCallback
  
  
  
| android.ranging.oob.TransportHandle.ReceiveCallback | 
TransportHandle callback.
Summary
Public methods | |
|---|---|
        abstract
        
        
        
        
        void
     | 
  
    
      
      onClose()
      
      
        Notifies the receiver that the TransportHandle instance can't be used anymore to receive or send data.  | 
  
        abstract
        
        
        
        
        void
     | 
  
    
      
      onDisconnect()
      
      
        Notifies the receiver that the TransportHandle instance can't be used to receive or send data until is called.  | 
  
        abstract
        
        
        
        
        void
     | 
  
    
      
      onReceiveData(byte[] data)
      
      
        Notifies and provides data received from the peer device.  | 
  
        abstract
        
        
        
        
        void
     | 
  
    
      
      onReconnect()
      
      
        Notifies the receiver the TransportHandle instance can be used again to send and receive data.  | 
  
        abstract
        
        
        
        
        void
     | 
  
    
      
      onSendFailed()
      
      
        Called when a data send operation fails.  | 
  
Public methods
onClose
public abstract void onClose ()
Notifies the receiver that the TransportHandle instance can't be used anymore to receive
 or send data. Also call this in AutoCloseable.close().
onDisconnect
public abstract void onDisconnect ()
Notifies the receiver that the TransportHandle instance can't be used to receive or send data until is called.
See also:
onReceiveData
public abstract void onReceiveData (byte[] data)
Notifies and provides data received from the peer device.
| Parameters | |
|---|---|
data | 
        
          byte: the data received from the peer device. Must not be null. | 
      
onReconnect
public abstract void onReconnect ()
Notifies the receiver the TransportHandle instance can be used again to send and receive data. Should only be called if preceded it.
See also:
onSendFailed
public abstract void onSendFailed ()
Called when a data send operation fails.