org.ow2.jasmine.probe.rest.impl
Class JTask

java.lang.Object
  extended by org.ow2.jasmine.probe.rest.impl.JTask
All Implemented Interfaces:
Task

public class JTask
extends Object
implements Task

Task objects are used to keep data collected by probes (JasmineProbeResult) and transform this data into XML format. The transformed data is used by the JTasks singleton object that implements the GET /task REST commands. Data is set by dedicated "rest" typed outputs.

Author:
danesa

Constructor Summary
JTask(String probeId, String taskId)
           
 
Method Summary
 String composeName(JasmineIndicatorValue jiv, String jsrName)
          Compose name of value as in JOuter !! ***** TODO move this code to a common module ****
protected  List<JAXBElement<JsrType>> getLastResult()
          Used by the JTasks singleton to get data in XML format.
 String getTaskId()
           
 void setLastResult(JasmineProbeResult result)
          Used by the a dedicated "rest" output to set the probe's result into the task.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JTask

public JTask(String probeId,
             String taskId)
Method Detail

getLastResult

protected List<JAXBElement<JsrType>> getLastResult()
Used by the JTasks singleton to get data in XML format.

Returns:
the JasmineProbeResult transformed into XML data

setLastResult

public void setLastResult(JasmineProbeResult result)
Used by the a dedicated "rest" output to set the probe's result into the task.

Specified by:
setLastResult in interface Task
Parameters:
result - the probe's result obtained at the last iteration.

getTaskId

public String getTaskId()
Specified by:
getTaskId in interface Task
Returns:
the task id

composeName

public String composeName(JasmineIndicatorValue jiv,
                          String jsrName)
Compose name of value as in JOuter !! ***** TODO move this code to a common module ****

Parameters:
jiv -
jsrName - name of the JasmineSingleResult
Returns:
Name of the value


Copyright © 2012 OW2 Consortium. All Rights Reserved.