@HTTPService(name="cserb") public class BackendService extends java.lang.Object
| Constructor and Description |
|---|
BackendService() |
| Modifier and Type | Method and Description |
|---|---|
void |
addTask(core.tut.pori.http.parameters.AuthenticationParameter authenticatedUser,
core.tut.pori.http.parameters.InputStreamParameter xml)
The request is to be sent in the body of POST method.
|
core.tut.pori.http.Response |
queryTaskStatus(core.tut.pori.http.parameters.AuthenticationParameter authenticatedUser,
core.tut.pori.http.parameters.StringParameter taskId,
core.tut.pori.http.parameters.DataGroups dataGroups,
core.tut.pori.http.parameters.Limits limits)
This method can be used to query the current status of a sensor task from the back-end.
|
public BackendService()
@HTTPServiceMethod(name="addTask",
acceptedMethods="POST")
public void addTask(@HTTPAuthenticationParameter(required=false)
core.tut.pori.http.parameters.AuthenticationParameter authenticatedUser,
@HTTPMethodParameter(name="body",bodyParameter=true)
core.tut.pori.http.parameters.InputStreamParameter xml)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<task>
<createdTimestamp>2018-06-15T01:12:20Z</createdTimestamp>
<description>qzdqrqaivxixpxwmxggjsuzonlwzgqqvapqhzzyexpnmmyomlpcmydpfbqusecmd</description>
<dataVisibility>PRIVATE</dataVisibility>
<name>zpykxmisxxbnnmhzpmkdtifcgohrdflzhrrmuwtyatlygulzufwivsijhjqortia</name>
<taskState>ARCHIVED</taskState>
<taskIdList>
<taskId>58be8f77-38a9-4494-9a0f-986a3d884917</taskId>
</taskIdList>
<taskTypeList>
<taskType>gather</taskType>
</taskTypeList>
<updatedTimestamp>2018-07-14T08:51:42Z</updatedTimestamp>
<userDetails>
<userId>7401448227112105906</userId>
</userDetails>
<backendList>
<backend>
<backendId>3567833701955654912</backendId>
</backend>
</backendList>
<callbackUri>http://example.org:8080/ApiltaService/rest/sensors/taskFinished</callbackUri>
<when>
<condition>
<terms>
<entry>
<key>algzp</key>
<value>moeiskvhaj</value>
</entry>
<entry>
<key>emuto</key>
<value>gknrjjseta</value>
</entry>
<entry>
<key>oauyk</key>
<value>fewoforazu</value>
</entry>
<entry>
<key>time/validFromToRange</key>
<value>2018-05-30T01:55:26.115Z/2019-02-23T09:10:22.116Z</value>
</entry>
<entry>
<key>uvehr</key>
<value>qbvsjmybtq</value>
</entry>
<entry>
<key>wyvyk</key>
<value>uhakgsdthy</value>
</entry>
</terms>
</condition>
<condition>
<terms>
<entry>
<key>auorm</key>
<value>nbxshoggqy</value>
</entry>
<entry>
<key>dggcq</key>
<value>xdyapoubmc</value>
</entry>
<entry>
<key>dhukl</key>
<value>syntezpadu</value>
</entry>
<entry>
<key>imxrf</key>
<value>fenbkxdpim</value>
</entry>
<entry>
<key>time/validFromToRange</key>
<value>2018-03-26T17:51:41.116Z/2019-05-30T14:05:13.116Z</value>
</entry>
<entry>
<key>xobng</key>
<value>gdgftedcrv</value>
</entry>
</terms>
</condition>
<condition>
<terms>
<entry>
<key>time/validFromToRange</key>
<value>2017-08-26T17:26:09.116Z/2018-07-27T22:03:06.116Z</value>
</entry>
<entry>
<key>udtqo</key>
<value>xxfaaoqlgz</value>
</entry>
<entry>
<key>zqgre</key>
<value>qsfstqofgs</value>
</entry>
</terms>
</condition>
</when>
<what>
<output>
<feature>lrocw</feature>
</output>
<output>
<feature>pwuny</feature>
</output>
<output>
<feature>jwnpd</feature>
</output>
</what>
</task>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <response method="addTask" service="cserb"> <status>OK</status> </response>
authenticatedUser - xml - Only the workload data should be in the body. See SensorTask@HTTPServiceMethod(name="queryTaskStatus",
acceptedMethods="GET")
public core.tut.pori.http.Response queryTaskStatus(@HTTPAuthenticationParameter(required=false)
core.tut.pori.http.parameters.AuthenticationParameter authenticatedUser,
@HTTPMethodParameter(name="task_id")
core.tut.pori.http.parameters.StringParameter taskId,
@HTTPMethodParameter(name="data_groups",required=false)
core.tut.pori.http.parameters.DataGroups dataGroups,
@HTTPMethodParameter(name="limits",required=false)
core.tut.pori.http.parameters.Limits limits)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response method="queryTaskStatus" service="cserb">
<task>
<dataVisibility>PUBLIC</dataVisibility>
<taskIdList>
<taskId>1</taskId>
</taskIdList>
<taskTypeList>
<taskType>gather</taskType>
</taskTypeList>
<backendList>
<backend>
<backendId>3325338642710541713</backendId>
<message>hvnxilhwznyubesumtzykofnqvjdoefhocvhouvdlaqdkhdqllrrjvcrkunrmzpd</message>
<taskStatus>EXECUTING</taskStatus>
</backend>
</backendList>
<callbackUri>http://example.org:8080/ApiltaService/rest/sensors/taskFinished</callbackUri>
<measurementList>
<measurement>
<backendId>3325338642710541713</backendId>
<measurementId>3e68443b-c3b6-4ae0-a3f7-844b7f4faf44</measurementId>
</measurement>
</measurementList>
</task>
<status>OK</status>
</response>
authenticatedUser - taskId - dataGroups - limits - paging limitsSensorTaskCopyright © 2015-2018 Tampere University of Technology, Pori Department.