• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java ApiCallback类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中cloud.artik.client.ApiCallback的典型用法代码示例。如果您正苦于以下问题:Java ApiCallback类的具体用法?Java ApiCallback怎么用?Java ApiCallback使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ApiCallback类属于cloud.artik.client包,在下文中一共展示了ApiCallback类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
 
开发者ID:artikcloud,项目名称:artikcloud-java,代码行数:35,代码来源:DevicesApi.java


示例2: deleteDeviceAsync

import cloud.artik.client.ApiCallback; //导入依赖的package包/类
/**
 * Delete Device (asynchronously)
 * Deletes 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 deleteDeviceAsync(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 = deleteDeviceValidateBeforeCall(deviceId, progressListener, progressRequestListener);
    Type localVarReturnType = new TypeToken<DeviceEnvelope>(){}.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}
 
开发者ID:artikcloud,项目名称:artikcloud-java,代码行数:35,代码来源:DevicesApi.java


示例3: deleteDeviceTokenAsync

import cloud.artik.client.ApiCallback; //导入依赖的package包/类
/**
 * Delete Device Token (asynchronously)
 * Deletes a device&#39;s token
 * @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 deleteDeviceTokenAsync(String deviceId, final ApiCallback<DeviceTokenEnvelope> 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 = deleteDeviceTokenValidateBeforeCall(deviceId, progressListener, progressRequestListener);
    Type localVarReturnType = new TypeToken<DeviceTokenEnvelope>(){}.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}
 
开发者ID:artikcloud,项目名称:artikcloud-java,代码行数:35,代码来源:DevicesApi.java


示例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;
}
 
开发者ID:artikcloud,项目名称:artikcloud-java,代码行数:35,代码来源:DevicesApi.java


示例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;
}
 
开发者ID:artikcloud,项目名称:artikcloud-java,代码行数:35,代码来源:DevicesApi.java


示例6: getDeviceTokenAsync

import cloud.artik.client.ApiCallback; //导入依赖的package包/类
/**
 * Get Device Token (asynchronously)
 * Retrieves a device&#39;s token
 * @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 getDeviceTokenAsync(String deviceId, final ApiCallback<DeviceTokenEnvelope> 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 = getDeviceTokenValidateBeforeCall(deviceId, progressListener, progressRequestListener);
    Type localVarReturnType = new TypeToken<DeviceTokenEnvelope>(){}.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}
 
开发者ID:artikcloud,项目名称:artikcloud-java,代码行数:35,代码来源:DevicesApi.java


示例7: updateDeviceAsync

import cloud.artik.client.ApiCallback; //导入依赖的package包/类
/**
 * Update Device (asynchronously)
 * Updates a device
 * @param deviceId deviceId (required)
 * @param device Device 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 updateDeviceAsync(String deviceId, 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 = updateDeviceValidateBeforeCall(deviceId, device, progressListener, progressRequestListener);
    Type localVarReturnType = new TypeToken<DeviceEnvelope>(){}.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}
 
开发者ID:artikcloud,项目名称:artikcloud-java,代码行数:36,代码来源:DevicesApi.java


示例8: updateDeviceTokenAsync

import cloud.artik.client.ApiCallback; //导入依赖的package包/类
/**
 * Update Device Token (asynchronously)
 * Updates a device&#39;s token
 * @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 updateDeviceTokenAsync(String deviceId, final ApiCallback<DeviceTokenEnvelope> 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 = updateDeviceTokenValidateBeforeCall(deviceId, progressListener, progressRequestListener);
    Type localVarReturnType = new TypeToken<DeviceTokenEnvelope>(){}.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}
 
开发者ID:artikcloud,项目名称:artikcloud-java,代码行数:35,代码来源:DevicesApi.java


示例9: createSubscriptionAsync

import cloud.artik.client.ApiCallback; //导入依赖的package包/类
/**
 * Create Subscription (asynchronously)
 * Create Subscription
 * @param subscriptionInfo Subscription details (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 createSubscriptionAsync(SubscriptionInfo subscriptionInfo, final ApiCallback<SubscriptionEnvelope> 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 = createSubscriptionValidateBeforeCall(subscriptionInfo, progressListener, progressRequestListener);
    Type localVarReturnType = new TypeToken<SubscriptionEnvelope>(){}.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}
 
开发者ID:artikcloud,项目名称:artikcloud-java,代码行数:35,代码来源:SubscriptionsApi.java


示例10: deleteSubscriptionAsync

import cloud.artik.client.ApiCallback; //导入依赖的package包/类
/**
 * Delete Subscription (asynchronously)
 * Delete Subscription
 * @param subId Subscription 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 deleteSubscriptionAsync(String subId, final ApiCallback<SubscriptionEnvelope> 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 = deleteSubscriptionValidateBeforeCall(subId, progressListener, progressRequestListener);
    Type localVarReturnType = new TypeToken<SubscriptionEnvelope>(){}.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}
 
开发者ID:artikcloud,项目名称:artikcloud-java,代码行数:35,代码来源:SubscriptionsApi.java


示例11: getAllSubscriptionsAsync

import cloud.artik.client.ApiCallback; //导入依赖的package包/类
/**
 * Get All Subscriptions (asynchronously)
 * Get All Subscriptions
 * @param uid User ID (optional)
 * @param offset Offset for pagination. (optional)
 * @param count Desired count of items in the result set. (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 getAllSubscriptionsAsync(String uid, Integer offset, Integer count, final ApiCallback<SubscriptionsEnvelope> 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 = getAllSubscriptionsValidateBeforeCall(uid, offset, count, progressListener, progressRequestListener);
    Type localVarReturnType = new TypeToken<SubscriptionsEnvelope>(){}.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}
 
开发者ID:artikcloud,项目名称:artikcloud-java,代码行数:37,代码来源:SubscriptionsApi.java


示例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 &#39;asc&#39; or &#39;desc&#39;. (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;
}
 
开发者ID:artikcloud,项目名称:artikcloud-java,代码行数:38,代码来源:SubscriptionsApi.java


示例13: getSubscriptionAsync

import cloud.artik.client.ApiCallback; //导入依赖的package包/类
/**
 * Get Subscription (asynchronously)
 * Get Subscription
 * @param subId Subscription 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 getSubscriptionAsync(String subId, final ApiCallback<SubscriptionEnvelope> 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 = getSubscriptionValidateBeforeCall(subId, progressListener, progressRequestListener);
    Type localVarReturnType = new TypeToken<SubscriptionEnvelope>(){}.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}
 
开发者ID:artikcloud,项目名称:artikcloud-java,代码行数:35,代码来源:SubscriptionsApi.java


示例14: validateSubscriptionAsync

import cloud.artik.client.ApiCallback; //导入依赖的package包/类
/**
 * Validate Subscription (asynchronously)
 * Validate Subscription
 * @param subId Subscription ID. (required)
 * @param validationCallbackRequest Subscription validation callback request (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 validateSubscriptionAsync(String subId, ValidationCallbackInfo validationCallbackRequest, final ApiCallback<SubscriptionEnvelope> 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 = validateSubscriptionValidateBeforeCall(subId, validationCallbackRequest, progressListener, progressRequestListener);
    Type localVarReturnType = new TypeToken<SubscriptionEnvelope>(){}.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}
 
开发者ID:artikcloud,项目名称:artikcloud-java,代码行数:36,代码来源:SubscriptionsApi.java


示例15: checkTokenAsync

import cloud.artik.client.ApiCallback; //导入依赖的package包/类
/**
 * Check Token (asynchronously)
 * (Deprecated) Check Token. See tokenInfo
 * @param tokenInfo Token object to be checked (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 checkTokenAsync(TokenRequest tokenInfo, final ApiCallback<CheckTokenResponse> 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 = checkTokenValidateBeforeCall(tokenInfo, progressListener, progressRequestListener);
    Type localVarReturnType = new TypeToken<CheckTokenResponse>(){}.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}
 
开发者ID:artikcloud,项目名称:artikcloud-java,代码行数:35,代码来源:TokensApi.java


示例16: refreshTokenAsync

import cloud.artik.client.ApiCallback; //导入依赖的package包/类
/**
 * Refresh Token (asynchronously)
 * Refresh Token
 * @param grantType Grant Type. (required)
 * @param refreshToken Refresh Token. (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 refreshTokenAsync(String grantType, String refreshToken, final ApiCallback<RefreshTokenResponse> 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 = refreshTokenValidateBeforeCall(grantType, refreshToken, progressListener, progressRequestListener);
    Type localVarReturnType = new TypeToken<RefreshTokenResponse>(){}.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}
 
开发者ID:artikcloud,项目名称:artikcloud-java,代码行数:36,代码来源:TokensApi.java


示例17: tokenInfoAsync

import cloud.artik.client.ApiCallback; //导入依赖的package包/类
/**
 * Token Info (asynchronously)
 * Returns the Token Information
 * @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 tokenInfoAsync(final ApiCallback<TokenInfoSuccessResponse> 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 = tokenInfoValidateBeforeCall(progressListener, progressRequestListener);
    Type localVarReturnType = new TypeToken<TokenInfoSuccessResponse>(){}.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}
 
开发者ID:artikcloud,项目名称:artikcloud-java,代码行数:34,代码来源:TokensApi.java


示例18: createUserPropertiesAsync

import cloud.artik.client.ApiCallback; //导入依赖的package包/类
/**
 * Create User Application Properties (asynchronously)
 * Create application properties for a user
 * @param userId User Id (required)
 * @param properties Properties to be updated (required)
 * @param aid Application ID (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 createUserPropertiesAsync(String userId, AppProperties properties, String aid, final ApiCallback<PropertiesEnvelope> 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 = createUserPropertiesValidateBeforeCall(userId, properties, aid, progressListener, progressRequestListener);
    Type localVarReturnType = new TypeToken<PropertiesEnvelope>(){}.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}
 
开发者ID:artikcloud,项目名称:artikcloud-java,代码行数:37,代码来源:UsersApi.java


示例19: deleteUserPropertiesAsync

import cloud.artik.client.ApiCallback; //导入依赖的package包/类
/**
 * Delete User Application Properties (asynchronously)
 * Deletes a user&#39;s application properties
 * @param userId User Id (required)
 * @param aid Application ID (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 deleteUserPropertiesAsync(String userId, String aid, final ApiCallback<PropertiesEnvelope> 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 = deleteUserPropertiesValidateBeforeCall(userId, aid, progressListener, progressRequestListener);
    Type localVarReturnType = new TypeToken<PropertiesEnvelope>(){}.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}
 
开发者ID:artikcloud,项目名称:artikcloud-java,代码行数:36,代码来源:UsersApi.java


示例20: getSelfAsync

import cloud.artik.client.ApiCallback; //导入依赖的package包/类
/**
 * Get Current User Profile (asynchronously)
 * Get&#39;s the current user&#39;s profile
 * @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 getSelfAsync(final ApiCallback<UserEnvelope> 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 = getSelfValidateBeforeCall(progressListener, progressRequestListener);
    Type localVarReturnType = new TypeToken<UserEnvelope>(){}.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}
 
开发者ID:artikcloud,项目名称:artikcloud-java,代码行数:34,代码来源:UsersApi.java



注:本文中的cloud.artik.client.ApiCallback类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java DataTypes类代码示例发布时间:2022-05-22
下一篇:
Java AS400类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap