public static final String PRESENCE_URI = "/oic/ad";
private static volatile boolean sIsPlatformInitialized = false;
+ private static QualityOfService sPlatformQualityOfService = QualityOfService.NA;
private OcPlatform() {
}
if (!sIsPlatformInitialized) {
CaInterface.initialize(platformConfig.getContext());
+ sPlatformQualityOfService = platformConfig.getQualityOfService();
+
OcPlatform.configure(
platformConfig.getServiceType().getValue(),
platformConfig.getModeType().getValue(),
/**
* This API registers a resource with the server
- * <P>
+ * <p/>
* Note: This API applies to server & client side.
* </P>
*
/**
* This API registers a resource with the server NOTE: This API applies to server side only.
- * <P>
+ * <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).
"OcPlatform.Configure before any other API calls are permitted");
}
}
+
+ /**
+ * Gets platform quality of service
+ *
+ * @return quality of service
+ */
+ public static QualityOfService getPlatformQualityOfService() {
+ OcPlatform.initCheck();
+ return sPlatformQualityOfService;
+ }
}