Package io.github.hapjava.services
Interface Service
-
- All Known Implementing Classes:
AccessoryInformationService,AirPurifierService,AirQualityService,BatteryService,CarbonDioxideSensorService,CarbonMonoxideSensorService,ContactSensorService,DoorbellService,DoorService,FanService,FaucetService,FilterMaintenanceService,GarageDoorOpenerService,HAPProtocolInformationService,HeaterCoolerService,HumidifierDehumidifierService,HumiditySensorService,InputSourceService,IrrigationSystemService,LeakSensorService,LightbulbService,LightSensorService,LockMechanismService,MicrophoneService,MotionSensorService,OccupancySensorService,OutletService,SecuritySystemService,ServiceLabelService,SlatService,SmartSpeakerService,SmokeSensorService,SpeakerService,StatelessProgrammableSwitchService,SwitchService,TelevisionService,TelevisionSpeakerService,TemperatureSensorService,ThermostatService,ValveService,WindowCoveringService,WindowService
public interface ServiceInterface for a Service offered by an accessory.- Author:
- Andy Lintner
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddLinkedService(Service service)Add linked servicesList<Characteristic>getCharacteristics()Characteristics are the variables offered for reading, updating, and eventing by the Service over the HomeKit protocol.List<Service>getLinkedServices()List of all the services to which the service linksStringgetType()The type is a UUID that uniquely identifies the type of Service offered.
-
-
-
Method Detail
-
getCharacteristics
List<Characteristic> getCharacteristics()
Characteristics are the variables offered for reading, updating, and eventing by the Service over the HomeKit protocol.It is important to maintain the order of this list and not change its contents between invocations, or a pairing error will result.
- Returns:
- the list of Characteristics.
-
getType
String getType()
The type is a UUID that uniquely identifies the type of Service offered. Apple defines several types for standard Services, however UUIDs outside this range are allowed for custom Services.- Returns:
- A string representation of the UUID, with hexadecimal digits in the format ########-####-####-####-############.
-
getLinkedServices
List<Service> getLinkedServices()
List of all the services to which the service links- Returns:
- the list of linked services.
-
addLinkedService
void addLinkedService(Service service)
Add linked services- Parameters:
service- linked service
-
-