Cleanup documentation warnings in the notification service java code
authorGeorge Nash <george.nash@intel.com>
Thu, 19 Jan 2017 20:40:50 +0000 (12:40 -0800)
committerRick Bell <richard.s.bell@intel.com>
Fri, 20 Jan 2017 17:26:52 +0000 (17:26 +0000)
Change-Id: I2c646eec70caba07ce8cafe4bdc9ad382e35ff1c
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/16609
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
service/notification/android/notification-service/src/main/java/org/iotivity/service/ns/consumer/ConsumerService.java
service/notification/android/notification-service/src/main/java/org/iotivity/service/ns/provider/Consumer.java
service/notification/android/notification-service/src/main/java/org/iotivity/service/ns/provider/ProviderService.java

index c5ea257..def5940 100755 (executable)
@@ -76,6 +76,8 @@ public class ConsumerService {
 
     /**
      * This API will Stop ConsumerService
+     *
+     * @throws NSException failed to stop ConsumerService
      */
     public void stop() throws NSException {
         nativeStop();
@@ -87,6 +89,8 @@ public class ConsumerService {
      * @param serverAddress
      *            serverAddress combined with IP address and port number using
      *            delimiter
+     *
+     * @throws NSException failed publish resource request
      */
     public void enableRemoteService(String serverAddress) throws NSException {
         nativeEnableRemoteService(serverAddress);
@@ -102,6 +106,8 @@ public class ConsumerService {
      *            the interest Topic name for subscription
      *
      * @return result code 100 = OK , 200 = ERROR , 300 = SUCCESS , 400 = FAIL
+     *
+     * @throws NSException failed to subscribe to MQ server
      */
     public int subscribeMQService(String servAdd, String topicName)
             throws NSException {
@@ -110,6 +116,8 @@ public class ConsumerService {
 
     /**
      * This API is called to request discovery manually
+     *
+     * @throws NSException failed to call discovery request
      */
     public void rescanProvider() throws NSException {
         nativeRescanProvider();
index e2e5f24..d16b58b 100644 (file)
@@ -33,6 +33,8 @@ public class Consumer {
 
     /**
      * Constructor of Consumer
+     *
+     * @param consumerId ConsumerId as a string
      */
     public Consumer(final String consumerId) {
         mConsumerId = consumerId;
@@ -56,6 +58,8 @@ public class Consumer {
      *            TRUE/FALSE.
      *
      * @return result code 100 = OK , 200 = ERROR , 300 = SUCCESS , 400 = FAIL
+     *
+     * @throws NSException failure accepting subscription request
      */
     public int acceptSubscription(boolean accepted) throws NSException {
         return nativeAcceptSubscription(mConsumerId, accepted);
@@ -68,6 +72,8 @@ public class Consumer {
      *            Topic name to select
      *
      * @return result code 100 = OK , 200 = ERROR , 300 = SUCCESS , 400 = FAIL
+     *
+     * @throws NSException failure selecting a topic
      */
     public int setTopic(String topicName) throws NSException {
         return nativeSetConsumerTopic(mConsumerId, topicName);
@@ -80,6 +86,8 @@ public class Consumer {
      *            Topic name to Unselect
      *
      * @return result code 100 = OK , 200 = ERROR , 300 = SUCCESS , 400 = FAIL
+     *
+     * @throws NSException failure unselecting topic
      */
     public int unsetTopic(String topicName) throws NSException {
         return nativeUnsetConsumerTopic(mConsumerId, topicName);
@@ -89,6 +97,8 @@ public class Consumer {
      * Request topic list with selection state for the consumer
      *
      * @return Topic list
+     *
+     * @throws NSException failure to request topic list
      */
     public TopicsList getConsumerTopicList() throws NSException {
         return nativeGetConsumerTopicList(mConsumerId);
index a9f5a20..db8e50f 100755 (executable)
@@ -93,6 +93,8 @@ public class ProviderService {
      * Stop ProviderService
      *
      * @return result code 100 = OK , 200 = ERROR , 300 = SUCCESS , 400 = FAIL
+     *
+     * @throws NSException failed to stop ProviderService
      */
     public int stop() throws NSException {
         return nativeStop();
@@ -105,6 +107,8 @@ public class ProviderService {
      *            Notification message including id, title, contentText
      *
      * @return result code 100 = OK , 200 = ERROR , 300 = SUCCESS , 400 = FAIL
+     *
+     * @throws NSException failed to send notification message
      */
     public int sendMessage(Message message) throws NSException {
         return nativeSendMessage(message);
@@ -118,6 +122,7 @@ public class ProviderService {
      *            unique Id of Notification message to synchronize the status
      * @param syncType
      *            SyncType of the SyncInfo message
+     * @throws NSException failed to send read-check
      */
     public void sendSyncInfo(long messageId, SyncInfo.SyncType syncType)
             throws NSException {
@@ -126,9 +131,11 @@ public class ProviderService {
 
     /**
      * Initialize Message class, Mandatory fields which are messge id and
-     * provider(device) id are filled with
+     * provider(device) id are filled
      *
      * @return Message
+     *
+     * @throws NSException failed to initialized message class
      */
     public Message createMessage() throws NSException {
         return nativeCreateMessage();
@@ -142,6 +149,8 @@ public class ProviderService {
      *            delimiter
      *
      * @return result code 100 = OK , 200 = ERROR , 300 = SUCCESS , 400 = FAIL
+     *
+     * @throws NSException failed to publish resource
      */
     public int enableRemoteService(String servAdd) throws NSException {
         return nativeEnableRemoteService(servAdd);
@@ -155,6 +164,8 @@ public class ProviderService {
      *            delimiter
      *
      * @return result code 100 = OK , 200 = ERROR , 300 = SUCCESS , 400 = FAIL
+     *
+     * @throws NSException failed to publish resource
      */
     public int disableRemoteService(String servAdd) throws NSException {
         return nativeDisableRemoteService(servAdd);
@@ -170,6 +181,8 @@ public class ProviderService {
      *            the interest Topic name for subscription
      *
      * @return result code 100 = OK , 200 = ERROR , 300 = SUCCESS , 400 = FAIL
+     *
+     * @throws NSException failed to subscribe to MQ server
      */
     public int subscribeMQService(String servAdd, String topicName)
             throws NSException {
@@ -183,6 +196,8 @@ public class ProviderService {
      *            Topic name to add
      *
      * @return result code 100 = OK , 200 = ERROR , 300 = SUCCESS , 400 = FAIL
+     *
+     * @throws NSException failed to add topic
      */
     public int registerTopic(String topicName) throws NSException {
         return nativeRegisterTopic(topicName);
@@ -195,6 +210,8 @@ public class ProviderService {
      *            Topic name to add
      *
      * @return result code 100 = OK , 200 = ERROR , 300 = SUCCESS , 400 = FAIL
+     *
+     * @throws NSException failed to delete topic
      */
     public int unregisterTopic(String topicName) throws NSException {
         return nativeUnregisterTopic(topicName);
@@ -205,6 +222,8 @@ public class ProviderService {
      *
      * 
      * @return result code 100 = OK , 200 = ERROR , 300 = SUCCESS , 400 = FAIL
+     *
+     * @throws NSException failed to get topics list
      */
     public TopicsList getRegisteredTopicList() throws NSException {
         return nativeGetRegisteredTopicList();