本文整理汇总了Java中cloud.artik.client.ApiCallback.onDownloadProgress方法的典型用法代码示例。如果您正苦于以下问题:Java ApiCallback.onDownloadProgress方法的具体用法?Java ApiCallback.onDownloadProgress怎么用?Java ApiCallback.onDownloadProgress使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cloud.artik.client.ApiCallback
的用法示例。
在下文中一共展示了ApiCallback.onDownloadProgress方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addDeviceAsync
import cloud.artik.client.ApiCallback; //导入方法依赖的package包/类
/**
* Add Device (asynchronously)
* Create a device
* @param device Device to be added to the user (required)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call addDeviceAsync(Device device, final ApiCallback<DeviceEnvelope> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = addDeviceValidateBeforeCall(device, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<DeviceEnvelope>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
示例2: getManifestPropertiesAsync
import cloud.artik.client.ApiCallback; //导入方法依赖的package包/类
/**
* Get manifest properties (asynchronously)
* Get a Device Type's manifest properties for a specific version.
* @param deviceTypeId Device Type ID. (required)
* @param version Manifest Version. (required)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call getManifestPropertiesAsync(String deviceTypeId, String version, final ApiCallback<ManifestPropertiesEnvelope> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = getManifestPropertiesValidateBeforeCall(deviceTypeId, version, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<ManifestPropertiesEnvelope>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
示例3: exportRequestAsync
import cloud.artik.client.ApiCallback; //导入方法依赖的package包/类
/**
* Create Export Request (asynchronously)
* Export normalized messages. The following input combinations are supported:<br/><table><tr><th>Combination</th><th>Parameters</th><th>Description</th></tr><tr><td>Get by users</td><td>uids</td><td>Search by a list of User IDs. For each user in the list, the current authenticated user must have read access over the specified user.</td></tr><tr><td>Get by devices</td><td>sdids</td><td>Search by Source Device IDs.</td></tr><tr><td>Get by device types</td><td>uids,sdtids</td><td>Search by list of Source Device Type IDs for the given list of users.</td></tr><tr><td>Get by trial</td><td>trialId</td><td>Search by Trial ID.</td></tr><tr><td>Get by combination of parameters</td><td>uids,sdids,sdtids</td><td>Search by list of Source Device IDs. Each Device ID must belong to a Source Device Type ID and a User ID.</td></tr><tr><td>Common</td><td>startDate,endDate,order,format,url,csvHeaders</td><td>Parameters that can be used with the above combinations.</td></tr></table>
* @param exportRequestInfo ExportRequest object that is passed in the body (required)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call exportRequestAsync(ExportRequestInfo exportRequestInfo, final ApiCallback<ExportRequestResponse> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = exportRequestValidateBeforeCall(exportRequestInfo, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<ExportRequestResponse>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
示例4: getDeviceAsync
import cloud.artik.client.ApiCallback; //导入方法依赖的package包/类
/**
* Get Device (asynchronously)
* Retrieves a device
* @param deviceId deviceId (required)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call getDeviceAsync(String deviceId, final ApiCallback<DeviceEnvelope> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = getDeviceValidateBeforeCall(deviceId, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<DeviceEnvelope>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
示例5: getDevicePresenceAsync
import cloud.artik.client.ApiCallback; //导入方法依赖的package包/类
/**
* Get device presence information (asynchronously)
* Return the presence status of the given device along with the time it was last seen
* @param deviceId Device ID. (required)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call getDevicePresenceAsync(String deviceId, final ApiCallback<PresenceEnvelope> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = getDevicePresenceValidateBeforeCall(deviceId, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<PresenceEnvelope>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
示例6: getDeviceTypesAsync
import cloud.artik.client.ApiCallback; //导入方法依赖的package包/类
/**
* Get Device Types (asynchronously)
* Retrieves Device Types
* @param name Device Type name (required)
* @param offset Offset for pagination. (optional)
* @param count Desired count of items in the result set (optional)
* @param tags Elements tagged with the list of tags. (comma separated) (optional)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call getDeviceTypesAsync(String name, Integer offset, Integer count, String tags, final ApiCallback<DeviceTypesEnvelope> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = getDeviceTypesValidateBeforeCall(name, offset, count, tags, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<DeviceTypesEnvelope>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
示例7: getUserRulesAsync
import cloud.artik.client.ApiCallback; //导入方法依赖的package包/类
/**
* Get User Rules (asynchronously)
* Retrieve User's Rules
* @param userId User ID. (required)
* @param excludeDisabled Exclude disabled rules in the result. (optional)
* @param count Desired count of items in the result set. (optional)
* @param offset Offset for pagination. (optional)
* @param owner Rule owner (optional)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call getUserRulesAsync(String userId, Boolean excludeDisabled, Integer count, Integer offset, String owner, final ApiCallback<RulesEnvelope> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = getUserRulesValidateBeforeCall(userId, excludeDisabled, count, offset, owner, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<RulesEnvelope>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
示例8: deleteVdidAsync
import cloud.artik.client.ApiCallback; //导入方法依赖的package包/类
/**
* Delete a vdid from the devicetype whitelist. (asynchronously)
* Delete a vdid from the devicetype whitelist.
* @param dtid Device Type ID. (required)
* @param vdid Vendor Device ID. (required)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call deleteVdidAsync(String dtid, String vdid, final ApiCallback<WhitelistEnvelope> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = deleteVdidValidateBeforeCall(dtid, vdid, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<WhitelistEnvelope>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
示例9: getDevicesStatusAsync
import cloud.artik.client.ApiCallback; //导入方法依赖的package包/类
/**
* Get Devices Status (asynchronously)
* Get Devices Status
* @param dids List of device ids (comma-separated) for which the statuses are requested. (required)
* @param includeSnapshot Include device snapshot into the response (optional)
* @param includeSnapshotTimestamp Include device snapshot timestamp into the response (optional)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call getDevicesStatusAsync(String dids, Boolean includeSnapshot, Boolean includeSnapshotTimestamp, final ApiCallback<DeviceStatusBatch> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = getDevicesStatusValidateBeforeCall(dids, includeSnapshot, includeSnapshotTimestamp, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<DeviceStatusBatch>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
示例10: getExportHistoryAsync
import cloud.artik.client.ApiCallback; //导入方法依赖的package包/类
/**
* Get Export History (asynchronously)
* Get the history of export requests.
* @param trialId Filter by trialId. (optional)
* @param count Pagination count. (optional)
* @param offset Pagination offset. (optional)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call getExportHistoryAsync(String trialId, Integer count, Integer offset, final ApiCallback<ExportHistoryResponse> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = getExportHistoryValidateBeforeCall(trialId, count, offset, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<ExportHistoryResponse>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
示例11: getRequestStatusForUserAsync
import cloud.artik.client.ApiCallback; //导入方法依赖的package包/类
/**
* Get Request Status For User (asynchronously)
* This call checks the status of the request so users can poll and know when registration is complete.
* @param requestId Request ID. (required)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call getRequestStatusForUserAsync(String requestId, final ApiCallback<DeviceRegStatusResponseEnvelope> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = getRequestStatusForUserValidateBeforeCall(requestId, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<DeviceRegStatusResponseEnvelope>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
示例12: getMessagesAsync
import cloud.artik.client.ApiCallback; //导入方法依赖的package包/类
/**
* Get Messages (asynchronously)
* Get Messages
* @param notifId Notification ID. (required)
* @param offset Offset for pagination. (optional)
* @param count Desired count of items in the result set. (optional)
* @param order Sort order of results by ts. Either 'asc' or 'desc'. (optional)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call getMessagesAsync(String notifId, Integer offset, Integer count, String order, final ApiCallback<NotifMessagesResponse> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = getMessagesValidateBeforeCall(notifId, offset, count, order, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<NotifMessagesResponse>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
示例13: getStatusesAsync
import cloud.artik.client.ApiCallback; //导入方法依赖的package包/类
/**
* Returns the details and status of a task id and the individual statuses of each device id in the list. (asynchronously)
* Returns the details and status of a task id and the individual statuses of each device id in the list.
* @param tid Task ID. (required)
* @param count Max results count. (optional)
* @param offset Result starting offset. (optional)
* @param status Status filter. Comma-separated statuses. (optional)
* @param dids Devices filter. Comma-separated device IDs. (optional)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call getStatusesAsync(String tid, Integer count, Integer offset, String status, String dids, final ApiCallback<TaskStatusesEnvelope> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = getStatusesValidateBeforeCall(tid, count, offset, status, dids, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<TaskStatusesEnvelope>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
示例14: updateRuleAsync
import cloud.artik.client.ApiCallback; //导入方法依赖的package包/类
/**
* Update Rule (asynchronously)
* Update an existing Rule
* @param ruleId Rule ID. (required)
* @param ruleInfo Rule object that needs to be updated (required)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call updateRuleAsync(String ruleId, RuleUpdateInfo ruleInfo, final ApiCallback<RuleEnvelope> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = updateRuleValidateBeforeCall(ruleId, ruleInfo, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<RuleEnvelope>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
示例15: getUploadStatusAsync
import cloud.artik.client.ApiCallback; //导入方法依赖的package包/类
/**
* Get the status of a uploaded CSV file. (asynchronously)
* Get the status of a uploaded CSV file.
* @param dtid Device type id related to the uploaded CSV file. (required)
* @param uploadId Upload id related to the uploaded CSV file. (required)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call getUploadStatusAsync(String dtid, String uploadId, final ApiCallback<UploadStatusEnvelope> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
com.squareup.okhttp.Call call = getUploadStatusValidateBeforeCall(dtid, uploadId, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<UploadStatusEnvelope>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}