Android: Added/Updated JavaDocs
authorTim Kourt <tim.a.kourt@intel.com>
Wed, 30 Sep 2015 21:31:56 +0000 (14:31 -0700)
committerPatrick Lankswert <patrick.lankswert@intel.com>
Thu, 1 Oct 2015 18:41:21 +0000 (18:41 +0000)
In addition it adds a couple of missing ENUM
values that have been introduced recently

Change-Id: Iddd1eefec7b59f041036093e51ae336d28778487
Signed-off-by: Tim Kourt <tim.a.kourt@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/3331
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Patrick Lankswert <patrick.lankswert@intel.com>
android/android_api/base/jni/JniUtils.h
android/android_api/base/src/main/java/org/iotivity/base/EntityHandlerResult.java
android/android_api/base/src/main/java/org/iotivity/base/ModeType.java
android/android_api/base/src/main/java/org/iotivity/base/OcDeviceInfo.java
android/android_api/base/src/main/java/org/iotivity/base/OcPlatform.java
android/android_api/base/src/main/java/org/iotivity/base/OcPlatformInfo.java
android/android_api/base/src/main/java/org/iotivity/base/OcResource.java
android/android_api/base/src/main/java/org/iotivity/base/OcResourceIdentifier.java
android/android_api/base/src/main/java/org/iotivity/base/QualityOfService.java
android/android_api/base/src/main/java/org/iotivity/base/ResourceProperty.java

index 63d6391..25e769c 100644 (file)
@@ -120,6 +120,8 @@ public:
             return OCEntityHandlerResult::OC_EH_SLOW;
         case 5:
             return OCEntityHandlerResult::OC_EH_FORBIDDEN;
+        case 6:
+            return OCEntityHandlerResult::OC_EH_RESOURCE_NOT_FOUND;
         default:
             ThrowOcException(OC_STACK_INVALID_PARAM, "Unexpected OCEntityHandlerResult");
             return OCEntityHandlerResult::OC_EH_ERROR;
index 676919d..17fe3f4 100644 (file)
 
 package org.iotivity.base;
 
+/**
+ * Possible returned values from entity handler.
+ */
 public enum EntityHandlerResult {
     OK(0),
     ERROR(1),
     RESOURCE_CREATED(2),
     RESOURCE_DELETED(3),
     SLOW(4),
-    FORBIDDEN(5);
+    FORBIDDEN(5),
+    RESOURCE_NOT_FOUND(6);
 
     private int value;
 
index 96ce9d7..52dfb66 100644 (file)
 
 package org.iotivity.base;
 
+/**
+ * Host Mode of Operation.
+ */
 public enum ModeType {
+    /**
+     * Server mode.
+     */
     SERVER(0),
+    /**
+     * Client mode.
+     */
     CLIENT(1),
+    /**
+     * Client/Server mode.
+     */
     CLIENT_SERVER(2),
-    GATEWAY(3),;  /**< Client server mode along with Routing capabilities.*/
+    /**
+     * Client/Server mode along with Routing capabilities.
+     */
+    GATEWAY(3),;
 
     private int value;
 
index a793e7a..4a89856 100644 (file)
 
 package org.iotivity.base;
 
+/**
+ * This class is expected as input for device properties. Device name is mandatory and expected
+ * from the application. Device id of type UUID will be generated by the stack.
+ */
 public class OcDeviceInfo {
 
     private String mDeviceName;
index dc0062f..5b2388d 100644 (file)
@@ -29,9 +29,9 @@ import java.util.Iterator;
 import java.util.List;
 
 /**
- * Contains the main entrance/functionality of the product. To set a custom configuration, the
- * implementer must make a call to OcPlatform.Configure before the first usage of a function in this
- * class.
+ * This class contains the main entrance/functionality of the product. To set a custom
+ * configuration, the implementer must make a call to OcPlatform.Configure before the first usage
+ * of a method in this class.
  */
 public final class OcPlatform {
 
@@ -76,7 +76,9 @@ public final class OcPlatform {
 
     /**
      * API for setting the configuration of the OcPlatform.
+     * <p>
      * Note: Any calls made to this AFTER the first call to OcPlatform.Configure will have no affect
+     * </p>
      *
      * @param platformConfig platform configuration
      */
@@ -106,9 +108,12 @@ public final class OcPlatform {
 
     /**
      * API for notifying base that resource's attributes have changed.
+     * <p>
+     * Note: This API is for server side only.
+     * </p>
      *
      * @param ocResourceHandle resource handle of the resource
-     * @throws OcException
+     * @throws OcException if failure
      */
     public static void notifyAllObservers(
             OcResourceHandle ocResourceHandle) throws OcException {
@@ -121,10 +126,13 @@ public final class OcPlatform {
 
     /**
      * API for notifying base that resource's attributes have changed.
+     * <p>
+     * Note: This API is for server side only.
+     * </p>
      *
      * @param ocResourceHandle resource handle of the resource
      * @param qualityOfService the quality of communication
-     * @throws OcException
+     * @throws OcException if failure
      */
     public static void notifyAllObservers(
             OcResourceHandle ocResourceHandle,
@@ -139,13 +147,16 @@ public final class OcPlatform {
 
     /**
      * API for notifying only specific clients that resource's attributes have changed.
+     * <p>
+     * Note: This API is for server side only.
+     * </p>
      *
      * @param ocResourceHandle    resource handle of the resource
      * @param ocObservationIdList These set of ids are ones which which will be notified upon
      *                            resource change.
      * @param ocResourceResponse  OcResourceResponse object used by app to fill the response for
      *                            this resource change
-     * @throws OcException
+     * @throws OcException if failure
      */
     public static void notifyListOfObservers(
             OcResourceHandle ocResourceHandle,
@@ -173,6 +184,9 @@ public final class OcPlatform {
 
     /**
      * API for notifying only specific clients that resource's attributes have changed.
+     * <p>
+     * Note: This API is for server side only.
+     * </p>
      *
      * @param ocResourceHandle    resource handle of the resource
      * @param ocObservationIdList These set of ids are ones which which will be notified upon
@@ -180,7 +194,7 @@ public final class OcPlatform {
      * @param ocResourceResponse  OcResourceResponse object used by app to fill the response for
      *                            this resource change
      * @param qualityOfService    the quality of communication
-     * @throws OcException
+     * @throws OcException if failure
      */
     public static void notifyListOfObservers(
             OcResourceHandle ocResourceHandle,
@@ -211,16 +225,18 @@ public final class OcPlatform {
             int qualityOfService) throws OcException;
 
     /**
-     * API for Service and Resource Discovery. NOTE: This API applies to client side only
+     * API for Service and Resource Discovery
+     * <p>
+     * Note: This API is for client side only.
+     * </p>
      *
-     * @param host                    Host IP Address of a service to direct resource discovery query.
+     * @param host                    Host Address of a service to direct resource discovery query.
      *                                If empty, performs multicast resource discovery query
      * @param resourceUri             name of the resource. If null or empty, performs search for all
      *                                resource names
-     * @param connectivityType        a type of connectivity indicating the interface. Example: IPV4,
-     *                                IPV6, ALL
+     * @param connectivityTypeSet     Set of types of connectivity. Example: IP
      * @param onResourceFoundListener Handles events, success states and failure states.
-     * @throws OcException
+     * @throws OcException if failure
      */
     public static void findResource(
             String host,
@@ -251,17 +267,19 @@ public final class OcPlatform {
             OnResourceFoundListener onResourceFoundListener) throws OcException;
 
     /**
-     * API for Service and Resource Discovery. NOTE: This API applies to client side only
+     * API for Service and Resource Discovery.
+     * <p>
+     * Note: This API is for client side only.
+     * </p>
      *
      * @param host                    Host IP Address of a service to direct resource discovery query.
      *                                If empty, performs multicast resource discovery query
      * @param resourceUri             name of the resource. If null or empty, performs search for all
      *                                resource names
-     * @param connectivityType        a type of connectivity indicating the interface. Example: IPV4,
-     *                                IPV6, ALL
+     * @param connectivityTypeSet     Set of types of connectivity. Example: IP
      * @param onResourceFoundListener Handles events, success states and failure states.
      * @param qualityOfService        the quality of communication
-     * @throws OcException
+     * @throws OcException if failure
      */
     public static void findResource(
             String host,
@@ -298,10 +316,9 @@ public final class OcPlatform {
      *
      * @param host                  Host IP Address. If null or empty, Multicast is performed.
      * @param deviceUri             Uri containing address to the virtual device
-     * @param connectivityType      a type of connectivity indicating the interface. Example: IPV4,
-     *                              IPV6, ALL
+     * @param connectivityTypeSet   Set of types of connectivity. Example: IP
      * @param onDeviceFoundListener Handles events, success states and failure states.
-     * @throws OcException
+     * @throws OcException if failure
      */
     public static void getDeviceInfo(
             String host,
@@ -334,11 +351,10 @@ public final class OcPlatform {
      *
      * @param host                  Host IP Address. If null or empty, Multicast is performed.
      * @param deviceUri             Uri containing address to the virtual device
-     * @param connectivityType      a type of connectivity indicating the interface. Example: IPV4,
-     *                              IPV6, ALL
+     * @param connectivityTypeSet   Set of types of connectivity. Example: IP
      * @param onDeviceFoundListener Handles events, success states and failure states.
      * @param qualityOfService      the quality of communication
-     * @throws OcException
+     * @throws OcException if failure
      */
     public static void getDeviceInfo(
             String host,
@@ -374,10 +390,9 @@ public final class OcPlatform {
      *
      * @param host                    Host IP Address. If null or empty, Multicast is performed.
      * @param platformUri             Uri containing address to the platform
-     * @param connectivityType        a type of connectivity indicating the interface. Example: IPV4,
-     *                                IPV6, ALL
+     * @param connectivityTypeSet     Set of types of connectivity. Example: IP
      * @param onPlatformFoundListener Handles events, success states and failure states.
-     * @throws OcException
+     * @throws OcException if failure
      */
 
     public static void getPlatformInfo(
@@ -411,11 +426,10 @@ public final class OcPlatform {
      *
      * @param host                    Host IP Address. If null or empty, Multicast is performed.
      * @param platformUri             Uri containing address to the platform
-     * @param connectivityType        a type of connectivity indicating the interface. Example: IPV4,
-     *                                IPV6, ALL
+     * @param connectivityTypeSet     Set of types of connectivity. Example: IP
      * @param onPlatformFoundListener Handles events, success states and failure states.
      * @param qualityOfService        the quality of communication
-     * @throws OcException
+     * @throws OcException if failure
      */
 
     public static void getPlatformInfo(
@@ -448,11 +462,14 @@ public final class OcPlatform {
             int qualityOfService) throws OcException;
 
     /**
-     * This API registers a resource with the server NOTE: This API applies to server side only.
+     * This API registers a resource with the server
+     * <P>
+     * Note: This API applies to server & client side.
+     * </P>
      *
      * @param ocResource The instance of OcResource with all data filled
      * @return resource handle
-     * @throws OcException
+     * @throws OcException if failure
      */
     public static OcResourceHandle registerResource(
             OcResource ocResource) throws OcException {
@@ -465,14 +482,16 @@ public final class OcPlatform {
 
     /**
      * This API registers a resource with the server NOTE: This API applies to server side only.
-     *
+     * <P>
+     * Note: This API applies to server side only.
+     * </P>
      * @param resourceUri         The URI of the resource. Example: "a/light"
      * @param resourceTypeName    The resource type. Example: "light"
      * @param resourceInterface   The resource interface (whether it is collection etc).
      * @param entityHandler       entity handler.
      * @param resourcePropertySet indicates the property of the resource
      * @return resource handle
-     * @throws OcException
+     * @throws OcException if failure
      */
     public static OcResourceHandle registerResource(
             String resourceUri,
@@ -507,7 +526,7 @@ public final class OcPlatform {
      * Register Device Info
      *
      * @param ocDeviceInfo object containing all the device specific information
-     * @throws OcException
+     * @throws OcException if failure
      */
     public static void registerDeviceInfo(
             OcDeviceInfo ocDeviceInfo) throws OcException {
@@ -525,7 +544,7 @@ public final class OcPlatform {
      * Register Platform Info
      *
      * @param ocPlatformInfo object containing all the platform specific information
-     * @throws OcException
+     * @throws OcException if failure
      */
     public static void registerPlatformInfo(
             OcPlatformInfo ocPlatformInfo) throws OcException {
@@ -557,7 +576,7 @@ public final class OcPlatform {
      *
      * @param ocResourceHandle This is the resource handle which we which to unregister from the
      *                         server
-     * @throws OcException
+     * @throws OcException if failure
      */
     public static void unregisterResource(
             OcResourceHandle ocResourceHandle) throws OcException {
@@ -574,7 +593,7 @@ public final class OcPlatform {
      *
      * @param ocResourceCollectionHandle handle to the collection resource
      * @param ocResourceHandle           handle to resource to be added to the collection resource
-     * @throws OcException
+     * @throws OcException if failure
      */
     public static void bindResource(
             OcResourceHandle ocResourceCollectionHandle,
@@ -593,7 +612,7 @@ public final class OcPlatform {
      * @param ocResourceCollectionHandle handle to the collection resource
      * @param ocResourceHandleList       reference to list of resource handles to be added to the
      *                                   collection resource
-     * @throws OcException
+     * @throws OcException if failure
      */
     public static void bindResources(
             OcResourceHandle ocResourceCollectionHandle,
@@ -615,7 +634,7 @@ public final class OcPlatform {
      *
      * @param ocResourceCollectionHandle handle to the collection resource
      * @param ocResourceHandle           resource handle to be unbound from the collection resource
-     * @throws OcException
+     * @throws OcException if failure
      */
     public static void unbindResource(
             OcResourceHandle ocResourceCollectionHandle,
@@ -634,7 +653,7 @@ public final class OcPlatform {
      * @param ocResourceCollectionHandle Handle to the collection resource
      * @param ocResourceHandleList       List of resource handles to be unbound from the collection
      *                                   resource
-     * @throws OcException
+     * @throws OcException if failure
      */
     public static void unbindResources(
             OcResourceHandle ocResourceCollectionHandle,
@@ -656,7 +675,7 @@ public final class OcPlatform {
      *
      * @param ocResourceHandle handle to the resource
      * @param resourceTypeName new typename to bind to the resource
-     * @throws OcException
+     * @throws OcException if failure
      */
     public static void bindTypeToResource(
             OcResourceHandle ocResourceHandle,
@@ -674,7 +693,7 @@ public final class OcPlatform {
      *
      * @param ocResourceHandle      handle to the resource
      * @param resourceInterfaceName new interface to bind to the resource
-     * @throws OcException
+     * @throws OcException if failure
      */
     public static void bindInterfaceToResource(
             OcResourceHandle ocResourceHandle,
@@ -691,7 +710,7 @@ public final class OcPlatform {
      * Start Presence announcements.
      *
      * @param ttl time to live in seconds
-     * @throws OcException
+     * @throws OcException if failure
      */
     public static void startPresence(int ttl) throws OcException {
         OcPlatform.initCheck();
@@ -703,7 +722,7 @@ public final class OcPlatform {
     /**
      * Stop Presence announcements.
      *
-     * @throws OcException
+     * @throws OcException if failure
      */
     public static void stopPresence() throws OcException {
         OcPlatform.initCheck();
@@ -716,13 +735,12 @@ public final class OcPlatform {
      * Subscribes to a server's presence change events. By making this subscription, every time a
      * server adds/removes/alters a resource, starts or is intentionally stopped
      *
-     * @param host               The IP address/addressable name of the server to subscribe to
-     * @param connectivityType   a type of connectivity indicating the interface. Example: IPV4,
-     *                           IPV6, ALL
-     * @param onPresenceListener listener that will receive notifications/subscription events
+     * @param host                The IP address/addressable name of the server to subscribe to
+     * @param connectivityTypeSet Set of types of connectivity. Example: IP
+     * @param onPresenceListener  listener that will receive notifications/subscription events
      * @return a handle object that can be used to identify this subscription request. It can be
      * used to unsubscribe from these events in the future
-     * @throws OcException
+     * @throws OcException if failure
      */
     public static OcPresenceHandle subscribePresence(
             String host,
@@ -751,14 +769,13 @@ public final class OcPlatform {
      * Subscribes to a server's presence change events. By making this subscription, every time a
      * server adds/removes/alters a resource, starts or is intentionally stopped
      *
-     * @param host               The IP address/addressable name of the server to subscribe to
-     * @param resourceType       a resource type specified as a filter for subscription events.
-     * @param connectivityType   a type of connectivity indicating the interface. Example: IPV4,
-     *                           IPV6, ALL
-     * @param onPresenceListener listener that will receive notifications/subscription events
+     * @param host                The IP address/addressable name of the server to subscribe to
+     * @param resourceType        a resource type specified as a filter for subscription events.
+     * @param connectivityTypeSet Set of types of connectivity. Example: IP
+     * @param onPresenceListener  listener that will receive notifications/subscription events
      * @return a handle object that can be used to identify this subscription request. It can be
      * used to unsubscribe from these events in the future
-     * @throws OcException
+     * @throws OcException if failure
      */
     public static OcPresenceHandle subscribePresence(
             String host,
@@ -792,7 +809,7 @@ public final class OcPlatform {
      *
      * @param ocPresenceHandle the handle object provided by the subscribePresence call that
      *                         identifies this subscription
-     * @throws OcException
+     * @throws OcException if failure
      */
     public static void unsubscribePresence(
             OcPresenceHandle ocPresenceHandle) throws OcException {
@@ -811,18 +828,17 @@ public final class OcPlatform {
      * Additionally, you can only create this object if OcPlatform was initialized to be a Client
      * or Client/Server.
      *
-     * @param host             a string containing a resolvable host address of the server holding
-     *                         the resource
-     * @param uri              the rest of the resource's URI that will permit messages to be
-     *                         properly routed.
-     *                         Example: /a/light
-     * @param connectivityType a type of connectivity indicating the interface. Example: IPV4,
-     *                         IPV6, ALL
-     * @param isObservable     a boolean containing whether the resource supports observation
-     * @param resourceTypeList a collection of resource types implemented by the resource
-     * @param interfaceList    a collection of interfaces that the resource supports/implements
+     * @param host                a string containing a resolvable host address of the server holding
+     *                            the resource
+     * @param uri                 the rest of the resource's URI that will permit messages to be
+     *                            properly routed.
+     *                            Example: /a/light
+     * @param connectivityTypeSet Set of types of connectivity. Example: IP
+     * @param isObservable        a boolean containing whether the resource supports observation
+     * @param resourceTypeList    a collection of resource types implemented by the resource
+     * @param interfaceList       a collection of interfaces that the resource supports/implements
      * @return new resource object
-     * @throws OcException
+     * @throws OcException if failure
      */
     public static OcResource constructResourceObject(
             String host,
@@ -860,7 +876,7 @@ public final class OcPlatform {
      * Allows application entity handler to send response to an incoming request.
      *
      * @param ocResourceResponse resource response
-     * @throws OcException
+     * @throws OcException if failure
      */
     public static void sendResponse(OcResourceResponse ocResourceResponse)
             throws OcException {
index 1ed7a94..89af6a2 100644 (file)
 
 package org.iotivity.base;
 
-import java.security.InvalidParameterException;
-
+/**
+ * This class describes the platform properties. All non-Null properties will be
+ * included in a platform discovery request.
+ */
 public class OcPlatformInfo {
     private String mPlatformId;
     private String mManufacturerName;
@@ -37,9 +39,11 @@ public class OcPlatformInfo {
     private String mSupportUrl;
     private String mSystemTime;
 
-    // construct OcPlatformInfo with mandatory fields which cannot be null
-    // manufacturerName cannot be > 16 chars
-    // manufacturerUrl cannot be > 32 chars
+    /**
+     * construct OcPlatformInfo with mandatory fields which cannot be null
+     * manufacturerName cannot be > 16 chars
+     * manufacturerUrl cannot be > 32 chars
+     */
     public OcPlatformInfo(String platformId, String manufacturerName,
                           String manufacturerUrl) {
         this.mPlatformId = platformId;
index a6920e6..333c5b2 100644 (file)
@@ -47,7 +47,7 @@ public class OcResource {
      * @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;
@@ -60,7 +60,7 @@ public class OcResource {
      *                         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,
@@ -81,7 +81,7 @@ public class OcResource {
      * @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,
@@ -109,7 +109,7 @@ public class OcResource {
      *                          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,
@@ -137,7 +137,7 @@ public class OcResource {
      * @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,
@@ -151,7 +151,7 @@ public class OcResource {
      * @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,
@@ -178,7 +178,7 @@ public class OcResource {
      * @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,
@@ -209,7 +209,7 @@ public class OcResource {
      * @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,
@@ -240,7 +240,7 @@ public class OcResource {
      * @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,
@@ -254,7 +254,7 @@ public class OcResource {
      * @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,
@@ -281,7 +281,7 @@ public class OcResource {
      * @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,
@@ -503,7 +503,9 @@ public class OcResource {
 
     /**
      * 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
      */
index 6fe698f..b1ce94a 100644 (file)
 
 package org.iotivity.base;
 
+/**
+ * OcResourceIdentifier represents the identity information for a server. This
+ * object combined with the OcResource's URI property uniquely identify an
+ * OcResource on or across networks.
+ */
 public class OcResourceIdentifier {
     private OcResourceIdentifier(long nativeHandle) {
         this.mNativeHandle = nativeHandle;
index fe511c4..e6d6659 100644 (file)
 package org.iotivity.base;
 
 /**
+ * Quality of Service attempts to abstract the guarantees provided by the underlying transport
+ * protocol. The precise definitions of each quality of service level depend on the
+ * implementation. In descriptions below are for the current implementation and may changed
+ * over time.
  */
 public enum QualityOfService {
+    /**
+     * Packet delivery is best effort.
+     */
     LOW(0),
+    /**
+     * Packet delivery is best effort.
+     */
     MEDIUM(1),
+    /**
+     * Acknowledgments are used to confirm delivery.
+     */
     HIGH(2),
+    /**
+     * No Quality is defined, let the stack decide.
+     */
     NA(3);
 
     private int value;
index d35c133..71e8b6f 100644 (file)
 
 package org.iotivity.base;
 
+/**
+ * Resource Properties.
+ */
 public enum ResourceProperty {
+    /**
+     * When none of the bits are set, the resource is non-discoverable &
+     * non-observable by the client.
+     */
+    RES_PROP_NONE(0),
+    /**
+     * When this bit is set, the resource is allowed to be discovered by clients.
+     */
     DISCOVERABLE(1 << 0),
+    /**
+     * When this bit is set, the resource is allowed to be observed by clients.
+     */
     OBSERVABLE(1 << 1),
+    /**
+     * When this bit is set, the resource is initialized, otherwise the resource
+     * is 'inactive'. 'inactive' signifies that the resource has been marked for
+     * deletion or is already deleted.
+     */
     ACTIVE(1 << 2),
+    /**
+     * When this bit is set, the resource has been marked as 'slow'.
+     * 'slow' signifies that responses from this resource can expect delays in
+     * processing its requests from clients.
+     */
     SLOW(1 << 3),
-    SECURE(1 << 4);
+    /**
+     * When this bit is set, the resource is a secure resource.
+     */
+    SECURE(1 << 4),
+    /**
+     * When this bit is set, the resource is allowed to be discovered only
+     * if discovery request contains an explicit querystring.
+     * Ex: GET /oic/res?rt=oic.sec.acl
+     */
+    EXPLICIT_DISCOVERABLE(1 << 5),;
 
     private int value;