@ProviderType
public interface ModemManagerService
Modifier and Type | Interface and Description |
---|---|
static interface |
ModemManagerService.ModemFunction<T,U> |
Modifier and Type | Method and Description |
---|---|
java.util.Collection<CellularModem> |
getAllModemServices()
Deprecated.
since 2.2 use
ModemManagerService#withAllModemServices(Function) instead |
CellularModem |
getModemService(java.lang.String id)
Deprecated.
since 2.2 use
ModemManagerService#withModemService(String, Function) instead |
<T> T |
withAllModemServices(ModemManagerService.ModemFunction<java.util.Collection<CellularModem>,T> func)
Applies the provided function to all currently tracked modems.
|
<T> T |
withModemService(java.lang.String id,
ModemManagerService.ModemFunction<java.util.Optional<CellularModem>,T> func)
Applies the provided function to the modem named
id . |
@Deprecated CellularModem getModemService(java.lang.String id)
ModemManagerService#withModemService(String, Function)
insteadid
- The id of the modem, in case of an USB modem, the id is the USB port as returned by
AbstractUsbDevice.getUsbPort()
, in case of a serial modem the id is the
product name as returned by AbstractUsbDevice.getProductName()
null
if a modem with the given id is not currently tracked@Deprecated java.util.Collection<CellularModem> getAllModemServices()
ModemManagerService#withAllModemServices(Function)
instead<T> T withModemService(java.lang.String id, ModemManagerService.ModemFunction<java.util.Optional<CellularModem>,T> func) throws KuraException
id
.
The function will have exclusive access to the modem until it returns.T
- The return type of the functionid
- The id of the modem, in case of an USB modem, the id is the USB port as returned by
AbstractUsbDevice.getUsbPort()
, in case of a serial modem the id is the
product name as returned by AbstractUsbDevice.getProductName()
func
- KuraException
<T> T withAllModemServices(ModemManagerService.ModemFunction<java.util.Collection<CellularModem>,T> func) throws KuraException
T
- The return type of the functionfunc
- The function to be calledKuraException