/**
* This API will Stop ConsumerService
+ *
+ * @throws NSException failed to stop ConsumerService
*/
public void stop() throws NSException {
nativeStop();
* @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);
* 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 {
/**
* This API is called to request discovery manually
+ *
+ * @throws NSException failed to call discovery request
*/
public void rescanProvider() throws NSException {
nativeRescanProvider();
/**
* Constructor of Consumer
+ *
+ * @param consumerId ConsumerId as a string
*/
public Consumer(final String consumerId) {
mConsumerId = consumerId;
* 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);
* 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);
* 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);
* 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);
* 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();
* 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);
* 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 {
/**
* 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();
* 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);
* 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);
* 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 {
* 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);
* 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);
*
*
* @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();