public class MyActivityHubServiceConsumer extends Object
Constructor and Description |
---|
MyActivityHubServiceConsumer(ModuleContext mc,
ActivityHubClient ahc)
Contructor
|
Modifier and Type | Method and Description |
---|---|
void |
deleteGui()
close the GUI window, e.g.
|
static List |
getActivityHubSensorInfo(ActivityHubSensor ahs)
Get details for a specific ActivityHub sensor
Get the ontological service request Send service request to service bus
Process the response Log errors if the call was not successful
|
static ServiceRequest |
getAllActivityHubSensorsRequest()
Create ontological service request no input output: resources that are
controled by ActivityHub service
|
static ArrayList |
getControlledActivityHubSensors()
Get a list of all available ActivityHub sensors in the system
Get the ontological service request Send service request to service bus
Process the response Log errors if the call was not successful
|
void |
getDeviceInfo(String sensorURI,
int deviceType)
The parameters are just URI-Strings to keep this class stateless A new
ActivityHubSensor is created from the Ontology according to the URIs from
the client application (client doesn't store Ontology Resource objects)
Pass this sensor object in service request
Process result list from service response Send result text array to GUI
|
void |
getSensors()
Fetch sensors from service bus and send to gui Process result list of
ActivityHubSensors from service response Send just URI-Strings to client
application to decouple from Ontology-stuff Display sensor list in GUI
|
public MyActivityHubServiceConsumer(ModuleContext mc, ActivityHubClient ahc)
mc
- universAAL-Middleware ModuleContextahc
- link to client applicationpublic static ArrayList getControlledActivityHubSensors()
public static List getActivityHubSensorInfo(ActivityHubSensor ahs)
public void getSensors()
public void getDeviceInfo(String sensorURI, int deviceType)
sensorURI
- is the resourceURIdeviceType
- is the type-id for the ActivityHubSensorpublic static ServiceRequest getAllActivityHubSensorsRequest()
public void deleteGui()
Copyright © 2018 universAAL Consortium. All rights reserved.