Changes between Version 8 and Version 9 of RpRepDeployment
- Timestamp:
- Oct 20, 2010, 12:49:10 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
RpRepDeployment
v8 v9 44 44 45 45 The RAI methods are provided by the **RAI handler** which is attached to the REP. The **RAI handler** presents the Resource the REP exposes to the SENSEI Resource Users. 46 In the example project a **com.sensinode.sensei.rep.rest.test.SensorType.class** is use sas an example for a RAI handler attached to the REP.46 In the example project a **com.sensinode.sensei.rep.rest.test.SensorType.class** is used as an example for a RAI handler attached to the REP. 47 47 48 '''RAI GET''' requests are handled by the method **toXML()** provided by the class **Sensor Type**. This method returns the Observation & Measurement value in XML/RDF format.48 '''RAI GET''' requests are handled by the method **toXML()** provided by the class **Sensor Type**. This method returns the Observation & Measurement value in XML/RDF format. 49 49 50 50 {{{ … … 82 82 }}} 83 83 84 For handling POST, PUT, DELETE and OPTION request you need to add methods with arbitrary names and annotate them with the appropriate Java annotations so that the Restlet framework will handle them accordingly. Make sure the method returns a value of type **org.restlet.representation.Representation**! 84 85 86 {{{ 87 /** 88 * Handle POST requests 89 */ 90 @Post 91 public Representation acceptItem(Representation entity) {} 92 }}} 85 93 86 94 === Resource Publish Interface ===