|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.universAAL.lddi.samples.activityhub.client.MyActivityHubServiceConsumer
public class MyActivityHubServiceConsumer
This class provides ontological service requests and processes the service responses This class is stateless; no objects (sensors) are stored here LogUtil from uAAL-Middleware is used here
Constructor Summary | |
---|---|
MyActivityHubServiceConsumer(ModuleContext mc,
ActivityHubClient ahc)
Contructor |
Method Summary | |
---|---|
void |
deleteGui()
close the GUI window, e.g. if the bundle is stopped; called by Activator |
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MyActivityHubServiceConsumer(ModuleContext mc, ActivityHubClient ahc)
mc
- uAAL-Middleware ModuleContextahc
- link to client applicationMethod Detail |
---|
public 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()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |