org.ow2.jasmine.probe.rest
Interface Probes

All Known Implementing Classes:
JProbes

public interface Probes

Root resource class for probes management. Contains methods to treat HTTP requests on "probe" resources.

Author:
danesa

Field Summary
static String RESOURCE_NAME
           
static String START_ACTION
           
static String STOP_ACTION
           
 
Method Summary
 javax.ws.rs.core.Response changeProbe(ProbeConfType probeConf, String probeId)
          Process HTTP PUT requests having /probe/{id} URI and updated probe configuration in its body.
 javax.ws.rs.core.Response changeProbePeriod(String probeId, String period)
          Process HTTP PUT requests having /probe/{id}/period allowing to change a probe's period
 javax.ws.rs.core.Response createProbe(ProbeType probeDef)
          Process HTTP POST requests having /probe URI and new probe definition in its body.
 javax.ws.rs.core.Response deleteDataTask(String probeId)
          Process HTTP DELETE requests having /probe/{id}/data URI Removes the data task created for the probe
 javax.ws.rs.core.Response deleteProbe(String probeId)
          Process HTTP DELETE requests having /probe/{id} URI Corresponds to probe-remove id
 javax.ws.rs.core.Response getDataTask(String probeId, javax.ws.rs.core.UriInfo ui)
          Process HTTP POST requests having /probe/{id}/data URI Creates a data task for this probe allowing to get collected results from this task.
 javax.ws.rs.core.Response getProbe(String probeId, javax.ws.rs.core.UriInfo ui)
          Process HTTP GET requests having /probe/{id} URI Corresponds to probe-list -n id
 javax.ws.rs.core.Response getProbes(javax.ws.rs.core.UriInfo ui)
          Process HTTP GET requests having /probe URI Corresponds to probe-list command
 javax.ws.rs.core.Response setState(String probeId, String actionName)
           
 

Field Detail

RESOURCE_NAME

static final String RESOURCE_NAME
See Also:
Constant Field Values

START_ACTION

static final String START_ACTION
See Also:
Constant Field Values

STOP_ACTION

static final String STOP_ACTION
See Also:
Constant Field Values
Method Detail

getProbes

javax.ws.rs.core.Response getProbes(@Context
                                    javax.ws.rs.core.UriInfo ui)
Process HTTP GET requests having /probe URI Corresponds to probe-list command

Returns:
response containing the existent probe ids.

getProbe

javax.ws.rs.core.Response getProbe(String probeId,
                                   @Context
                                   javax.ws.rs.core.UriInfo ui)
Process HTTP GET requests having /probe/{id} URI Corresponds to probe-list -n id

Parameters:
probeId -
Returns:
response

deleteProbe

javax.ws.rs.core.Response deleteProbe(String probeId)
Process HTTP DELETE requests having /probe/{id} URI Corresponds to probe-remove id

Parameters:
probeId -

createProbe

javax.ws.rs.core.Response createProbe(ProbeType probeDef)
Process HTTP POST requests having /probe URI and new probe definition in its body. The probeDef may contain the new probe's id. Otherwise, the the id is generated by JasmineProbe. Corresponds to probe-create command.

Parameters:
probeDef - new probe's definition
Returns:
status may be CRETED if creation successful (in this case the response contains the new probe's URI

changeProbe

javax.ws.rs.core.Response changeProbe(ProbeConfType probeConf,
                                      String probeId)
Process HTTP PUT requests having /probe/{id} URI and updated probe configuration in its body.

Parameters:
probeConf - the new configuration for the probe
probeId - the id of the probe to update
Returns:
response with state OK or NOT_FOUND or BAD_REQUEST if change failed

changeProbePeriod

javax.ws.rs.core.Response changeProbePeriod(String probeId,
                                            String period)
Process HTTP PUT requests having /probe/{id}/period allowing to change a probe's period

Parameters:
probeId - probe to change
period - updated period
Returns:

setState

javax.ws.rs.core.Response setState(String probeId,
                                   String actionName)
Parameters:
probeName -
actionName -

getDataTask

javax.ws.rs.core.Response getDataTask(String probeId,
                                      @Context
                                      javax.ws.rs.core.UriInfo ui)
Process HTTP POST requests having /probe/{id}/data URI Creates a data task for this probe allowing to get collected results from this task.

Parameters:
probeId -

deleteDataTask

javax.ws.rs.core.Response deleteDataTask(String probeId)
Process HTTP DELETE requests having /probe/{id}/data URI Removes the data task created for the probe

Parameters:
probeId -


Copyright © 2012 OW2 Consortium. All Rights Reserved.