* one or more resources.
*/
public class OcResource {
+ public static final String CREATED_URI_KEY = "createduri";
private OcResource(long nativeHandle) {
this.mNativeHandle = nativeHandle;
* @param onGetListener The event handler will be invoked with a map of attribute name and
* values. The event handler will also have the result from this Get
* operation This will have error codes
- * @throws OcException
+ * @throws OcException if failure
*/
public native void get(Map<String, String> queryParamsMap,
OnGetListener onGetListener) throws OcException;
* values. The event handler will also have the result from this Get
* operation This will have error codes
* @param qualityOfService the quality of communication
- * @throws OcException
+ * @throws OcException if failure
*/
public void get(Map<String, String> queryParamsMap,
OnGetListener onGetListener,
* @param onGetListener The event handler will be invoked with a map of attribute name and
* values. The event handler will also have the result from this Get
* operation This will have error codes
- * @throws OcException
+ * @throws OcException if failure
*/
public void get(String resourceType,
String resourceInterface,
* values. The event handler will also have the result from this Get
* operation This will have error codes
* @param qualityOfService the quality of communication
- * @throws OcException
+ * @throws OcException if failure
*/
public void get(String resourceType,
String resourceInterface,
* @param queryParamsMap Map which can have the query parameter name and value
* @param onPutListener event handler The event handler will be invoked with a map of attribute
* name and values.
- * @throws OcException
+ * @throws OcException if failure
*/
public native void put(OcRepresentation representation,
Map<String, String> queryParamsMap,
* @param onPutListener event handler The event handler will be invoked with a map of
* attribute name and values.
* @param qualityOfService the quality of communication
- * @throws OcException
+ * @throws OcException if failure
*/
public void put(OcRepresentation ocRepresentation,
Map<String, String> queryParamsMap,
* @param queryParamsMap Map which can have the query parameter name and value
* @param onPutListener event handler The event handler will be invoked with a map of
* attribute name and values.
- * @throws OcException
+ * @throws OcException if failure
*/
public void put(String resourceType,
String resourceInterface,
* @param onPutListener event handler The event handler will be invoked with a map of
* attribute name and values.
* @param qualityOfService the quality of communication
- * @throws OcException
+ * @throws OcException if failure
*/
public void put(String resourceType,
String resourceInterface,
* @param queryParamsMap Map which can have the query parameter name and value
* @param onPostListener event handler The event handler will be invoked with a map of
* attribute name and values.
- * @throws OcException
+ * @throws OcException if failure
*/
public native void post(OcRepresentation ocRepresentation,
Map<String, String> queryParamsMap,
* @param onPostListener event handler The event handler will be invoked with a map of
* attribute name and values.
* @param qualityOfService the quality of communication
- * @throws OcException
+ * @throws OcException if failure
*/
public void post(OcRepresentation ocRepresentation,
Map<String, String> queryParamsMap,
* @param queryParamsMap Map which can have the query parameter name and value
* @param onPostListener event handler The event handler will be invoked with a map of
* attribute name and values.
- * @throws OcException
+ * @throws OcException if failure
*/
public void post(String resourceType,
String resourceInterface,
/**
* Method to get a string representation of the resource's server ID.
- * * This is unique per- server independent on how it was discovered.
+ * <p>
+ * This is unique per- server independent on how it was discovered.
+ * </p>
*
* @return server ID
*/
* Event listeners are notified asynchronously
*/
public interface OnObserveListener {
+ /**
+ * To Register.
+ */
+ public static final int REGISTER = 0;
+ /**
+ * To Deregister.
+ */
+ public static final int DEREGISTER = 1;
+ /**
+ * Others.
+ */
+ public static final int NO_OPTION = 2;
+
public void onObserveCompleted(List<OcHeaderOption> headerOptionList,
OcRepresentation ocRepresentation,
int sequenceNumber);