io.swagger.client.ApiCallback Java Examples

The following examples show how to use io.swagger.client.ApiCallback. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: FlowfilequeuesApi.java    From nifi-api-client-java with Apache License 2.0 6 votes vote down vote up
/**
 * Gets a FlowFile from a Connection. (asynchronously)
 * 
 * @param id The connection id. (required)
 * @param flowfileUuid The flowfile uuid. (required)
 * @param clusterNodeId The id of the node where the content exists if clustered. (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 getFlowFileAsync(String id, String flowfileUuid, String clusterNodeId, final ApiCallback<Void> 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 = getFlowFileCall(id, flowfileUuid, clusterNodeId, progressListener, progressRequestListener);
    apiClient.executeAsync(call, callback);
    return call;
}
 
Example #2
Source File: ProcessgroupsApi.java    From nifi-api-client-java with Apache License 2.0 5 votes vote down vote up
/**
 * Deletes a process group (asynchronously)
 * 
 * @param id The process group id. (required)
 * @param version The revision is used to verify the client is working with the latest version of the flow. (optional)
 * @param clientId If the client id is not specified, new one will be generated. This value (whether specified or generated) is included in 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 removeProcessGroupAsync(String id, String version, String clientId, final ApiCallback<ProcessGroupEntity> 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 = removeProcessGroupCall(id, version, clientId, progressListener, progressRequestListener);
    Type localVarReturnType = new TypeToken<ProcessGroupEntity>(){}.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}
 
Example #3
Source File: ProcessgroupsApi.java    From nifi-api-client-java with Apache License 2.0 5 votes vote down vote up
/**
 * Creates a new process group (asynchronously)
 * 
 * @param id The process group id. (required)
 * @param body The remote process group configuration 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 createRemoteProcessGroupAsync(String id, RemoteProcessGroupEntity body, final ApiCallback<RemoteProcessGroupEntity> 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 = createRemoteProcessGroupCall(id, body, progressListener, progressRequestListener);
    Type localVarReturnType = new TypeToken<RemoteProcessGroupEntity>(){}.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}
 
Example #4
Source File: SystemdiagnosticsApi.java    From nifi-api-client-java with Apache License 2.0 5 votes vote down vote up
/**
 * Gets the diagnostics for the system NiFi is running on (asynchronously)
 * 
 * @param nodewise Whether or not to include the breakdown per node. Optional, defaults to false (optional)
 * @param clusterNodeId The id of the node where to get the status. (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 getSystemDiagnosticsAsync(Boolean nodewise, String clusterNodeId, final ApiCallback<SystemDiagnosticsEntity> 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 = getSystemDiagnosticsCall(nodewise, clusterNodeId, progressListener, progressRequestListener);
    Type localVarReturnType = new TypeToken<SystemDiagnosticsEntity>(){}.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}
 
Example #5
Source File: FlowApi.java    From nifi-api-client-java with Apache License 2.0 5 votes vote down vote up
/**
 * Gets status history for a remote process group (asynchronously)
 * 
 * @param id The process group 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 getProcessGroupStatusHistoryAsync(String id, final ApiCallback<StatusHistoryEntity> 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 = getProcessGroupStatusHistoryCall(id, progressListener, progressRequestListener);
    Type localVarReturnType = new TypeToken<StatusHistoryEntity>(){}.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}
 
Example #6
Source File: FlowApi.java    From nifi-api-client-java with Apache License 2.0 5 votes vote down vote up
/**
 * Gets status for a processor (asynchronously)
 * 
 * @param id The processor id. (required)
 * @param nodewise Whether or not to include the breakdown per node. Optional, defaults to false (optional)
 * @param clusterNodeId The id of the node where to get the status. (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 getProcessorStatusAsync(String id, Boolean nodewise, String clusterNodeId, final ApiCallback<ProcessorStatusEntity> 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 = getProcessorStatusCall(id, nodewise, clusterNodeId, progressListener, progressRequestListener);
    Type localVarReturnType = new TypeToken<ProcessorStatusEntity>(){}.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}
 
Example #7
Source File: PoliciesApi.java    From nifi-api-client-java with Apache License 2.0 5 votes vote down vote up
/**
 * Updates a access policy (asynchronously)
 * 
 * @param id The access policy id. (required)
 * @param body The access policy configuration 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 updateAccessPolicyAsync(String id, AccessPolicyEntity body, final ApiCallback<AccessPolicyEntity> 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 = updateAccessPolicyCall(id, body, progressListener, progressRequestListener);
    Type localVarReturnType = new TypeToken<AccessPolicyEntity>(){}.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}
 
Example #8
Source File: FlowApi.java    From nifi-api-client-java with Apache License 2.0 5 votes vote down vote up
/**
 * Gets status for an input port (asynchronously)
 * 
 * @param id The input port id. (required)
 * @param nodewise Whether or not to include the breakdown per node. Optional, defaults to false (optional)
 * @param clusterNodeId The id of the node where to get the status. (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 getInputPortStatusAsync(String id, Boolean nodewise, String clusterNodeId, final ApiCallback<PortStatusEntity> 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 = getInputPortStatusCall(id, nodewise, clusterNodeId, progressListener, progressRequestListener);
    Type localVarReturnType = new TypeToken<PortStatusEntity>(){}.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}
 
Example #9
Source File: FlowApi.java    From nifi-api-client-java with Apache License 2.0 5 votes vote down vote up
/**
 * Retrieves the configuration for this NiFi flow (asynchronously)
 * 
 * @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 getFlowConfigAsync(final ApiCallback<FlowConfigurationEntity> 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 = getFlowConfigCall(progressListener, progressRequestListener);
    Type localVarReturnType = new TypeToken<FlowConfigurationEntity>(){}.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}
 
Example #10
Source File: ProcessgroupsApi.java    From nifi-api-client-java with Apache License 2.0 5 votes vote down vote up
/**
 * Creates a new processor (asynchronously)
 * 
 * @param id The process group id. (required)
 * @param body The processor configuration 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 createProcessorAsync(String id, ProcessorEntity body, final ApiCallback<ProcessorEntity> 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 = createProcessorCall(id, body, progressListener, progressRequestListener);
    Type localVarReturnType = new TypeToken<ProcessorEntity>(){}.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}
 
Example #11
Source File: TenantsApi.java    From nifi-api-client-java with Apache License 2.0 5 votes vote down vote up
/**
 * Creates a user group (asynchronously)
 * Note: This endpoint is subject to change as NiFi and it&#39;s REST API evolve.
 * @param body The user group configuration 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 createUserGroupAsync(UserGroupEntity body, final ApiCallback<UserGroupEntity> 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 = createUserGroupCall(body, progressListener, progressRequestListener);
    Type localVarReturnType = new TypeToken<UserGroupEntity>(){}.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}
 
Example #12
Source File: ReportingtasksApi.java    From nifi-api-client-java with Apache License 2.0 5 votes vote down vote up
/**
 * Updates a reporting task (asynchronously)
 * 
 * @param id The reporting task id. (required)
 * @param body The reporting task configuration 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 updateReportingTaskAsync(String id, ReportingTaskEntity body, final ApiCallback<ReportingTaskEntity> 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 = updateReportingTaskCall(id, body, progressListener, progressRequestListener);
    Type localVarReturnType = new TypeToken<ReportingTaskEntity>(){}.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}
 
Example #13
Source File: FlowApi.java    From nifi-api-client-java with Apache License 2.0 5 votes vote down vote up
/**
 * Gets an action (asynchronously)
 * Note: This endpoint is subject to change as NiFi and it&#39;s REST API evolve.
 * @param id The action 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 getActionAsync(String id, final ApiCallback<ActionEntity> 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 = getActionCall(id, progressListener, progressRequestListener);
    Type localVarReturnType = new TypeToken<ActionEntity>(){}.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}
 
Example #14
Source File: FlowApi.java    From nifi-api-client-java with Apache License 2.0 5 votes vote down vote up
/**
 * Retrieves details about this NiFi to put in the About dialog (asynchronously)
 * 
 * @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 getAboutInfoAsync(final ApiCallback<AboutEntity> 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 = getAboutInfoCall(progressListener, progressRequestListener);
    Type localVarReturnType = new TypeToken<AboutEntity>(){}.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}
 
Example #15
Source File: AccessApi.java    From nifi-api-client-java with Apache License 2.0 5 votes vote down vote up
/**
 * Creates a single use access token for downloading FlowFile content. (asynchronously)
 * The token returned is a base64 encoded string. It is valid for a single request up to five minutes from being issued. It is used as a query parameter name &#39;access_token&#39;.
 * @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 createDownloadTokenAsync(final ApiCallback<String> 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 = createDownloadTokenCall(progressListener, progressRequestListener);
    Type localVarReturnType = new TypeToken<String>(){}.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}
 
Example #16
Source File: CountersApi.java    From nifi-api-client-java with Apache License 2.0 5 votes vote down vote up
/**
 * Updates the specified counter. This will reset the counter value to 0 (asynchronously)
 * Note: This endpoint is subject to change as NiFi and it&#39;s REST API evolve.
 * @param 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 updateCounterAsync(String id, final ApiCallback<CounterEntity> 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 = updateCounterCall(id, progressListener, progressRequestListener);
    Type localVarReturnType = new TypeToken<CounterEntity>(){}.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}
 
Example #17
Source File: ReportingtasksApi.java    From nifi-api-client-java with Apache License 2.0 5 votes vote down vote up
/**
 * Clears the state for a reporting task (asynchronously)
 * 
 * @param id The reporting task 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 clearStateAsync(String id, final ApiCallback<ComponentStateDTO> 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 = clearStateCall(id, progressListener, progressRequestListener);
    Type localVarReturnType = new TypeToken<ComponentStateDTO>(){}.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}
 
Example #18
Source File: FlowfilequeuesApi.java    From nifi-api-client-java with Apache License 2.0 5 votes vote down vote up
/**
 * Cancels and/or removes a request to drop the contents of this connection. (asynchronously)
 * 
 * @param id The connection id. (required)
 * @param dropRequestId The drop 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 removeDropRequestAsync(String id, String dropRequestId, final ApiCallback<DropRequestEntity> 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 = removeDropRequestCall(id, dropRequestId, progressListener, progressRequestListener);
    Type localVarReturnType = new TypeToken<DropRequestEntity>(){}.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}
 
Example #19
Source File: FlowfilequeuesApi.java    From nifi-api-client-java with Apache License 2.0 5 votes vote down vote up
/**
 * Gets the current status of a listing request for the specified connection. (asynchronously)
 * 
 * @param id The connection id. (required)
 * @param listingRequestId The listing 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 getListingRequestAsync(String id, String listingRequestId, final ApiCallback<ListingRequestEntity> 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 = getListingRequestCall(id, listingRequestId, progressListener, progressRequestListener);
    Type localVarReturnType = new TypeToken<ListingRequestEntity>(){}.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}
 
Example #20
Source File: TenantsApi.java    From nifi-api-client-java with Apache License 2.0 5 votes vote down vote up
/**
 * Gets all user groups (asynchronously)
 * Note: This endpoint is subject to change as NiFi and it&#39;s REST API evolve.
 * @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 getUserGroupsAsync(final ApiCallback<UserGroupsEntity> 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 = getUserGroupsCall(progressListener, progressRequestListener);
    Type localVarReturnType = new TypeToken<UserGroupsEntity>(){}.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}
 
Example #21
Source File: ControllerservicesApi.java    From nifi-api-client-java with Apache License 2.0 5 votes vote down vote up
/**
 * Deletes a controller service (asynchronously)
 * 
 * @param id The controller service id. (required)
 * @param version The revision is used to verify the client is working with the latest version of the flow. (optional)
 * @param clientId If the client id is not specified, new one will be generated. This value (whether specified or generated) is included in 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 removeControllerServiceAsync(String id, String version, String clientId, final ApiCallback<ControllerServiceEntity> 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 = removeControllerServiceCall(id, version, clientId, progressListener, progressRequestListener);
    Type localVarReturnType = new TypeToken<ControllerServiceEntity>(){}.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}
 
Example #22
Source File: PoliciesApi.java    From nifi-api-client-java with Apache License 2.0 5 votes vote down vote up
/**
 * Gets an access policy for the specified action and resource (asynchronously)
 * Will return the effective policy if no component specific policy exists for the specified action and resource. Must have Read permissions to the policy with the desired action and resource. Permissions for the policy that is returned will be indicated in the response. This means the client could be authorized to get the policy for a given component but the effective policy may be inherited from an ancestor Process Group. If the client does not have permissions to that policy, the response will not include the policy and the permissions in the response will be marked accordingly. If the client does not have permissions to the policy of the desired action and resource a 403 response will be returned.
 * @param action The request action. (required)
 * @param resource The resource of the policy. (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 getAccessPolicyForResourceAsync(String action, String resource, final ApiCallback<AccessPolicyEntity> 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 = getAccessPolicyForResourceCall(action, resource, progressListener, progressRequestListener);
    Type localVarReturnType = new TypeToken<AccessPolicyEntity>(){}.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}
 
Example #23
Source File: FlowfilequeuesApi.java    From nifi-api-client-java with Apache License 2.0 5 votes vote down vote up
/**
 * Lists the contents of the queue in this connection. (asynchronously)
 * 
 * @param id The connection 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 createFlowFileListingAsync(String id, final ApiCallback<ListingRequestEntity> 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 = createFlowFileListingCall(id, progressListener, progressRequestListener);
    Type localVarReturnType = new TypeToken<ListingRequestEntity>(){}.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}
 
Example #24
Source File: FlowfilequeuesApi.java    From nifi-api-client-java with Apache License 2.0 5 votes vote down vote up
/**
 * Creates a request to drop the contents of the queue in this connection. (asynchronously)
 * 
 * @param id The connection 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 createDropRequestAsync(String id, final ApiCallback<DropRequestEntity> 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 = createDropRequestCall(id, progressListener, progressRequestListener);
    Type localVarReturnType = new TypeToken<DropRequestEntity>(){}.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}
 
Example #25
Source File: ProcessgroupsApi.java    From nifi-api-client-java with Apache License 2.0 5 votes vote down vote up
/**
 * Creates a connection (asynchronously)
 * 
 * @param id The process group id. (required)
 * @param body The connection configuration 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 createConnectionAsync(String id, ConnectionEntity body, final ApiCallback<ConnectionEntity> 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 = createConnectionCall(id, body, progressListener, progressRequestListener);
    Type localVarReturnType = new TypeToken<ConnectionEntity>(){}.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}
 
Example #26
Source File: TemplatesApi.java    From nifi-api-client-java with Apache License 2.0 5 votes vote down vote up
/**
 * Exports a template (asynchronously)
 * 
 * @param id The template 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 exportTemplateAsync(String id, final ApiCallback<TemplateDTO> 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 = exportTemplateCall(id, progressListener, progressRequestListener);
    Type localVarReturnType = new TypeToken<TemplateDTO>(){}.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}
 
Example #27
Source File: ProcessgroupsApi.java    From nifi-api-client-java with Apache License 2.0 5 votes vote down vote up
/**
 * Gets all labels (asynchronously)
 * 
 * @param id The process group 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 getLabelsAsync(String id, final ApiCallback<LabelsEntity> 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 = getLabelsCall(id, progressListener, progressRequestListener);
    Type localVarReturnType = new TypeToken<LabelsEntity>(){}.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}
 
Example #28
Source File: ConnectionsApi.java    From nifi-api-client-java with Apache License 2.0 5 votes vote down vote up
/**
 * Gets a connection (asynchronously)
 * 
 * @param id The connection 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 getConnectionAsync(String id, final ApiCallback<ConnectionEntity> 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 = getConnectionCall(id, progressListener, progressRequestListener);
    Type localVarReturnType = new TypeToken<ConnectionEntity>(){}.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}
 
Example #29
Source File: DatatransferApi.java    From nifi-api-client-java with Apache License 2.0 5 votes vote down vote up
/**
 * Extend transaction TTL (asynchronously)
 * 
 * @param portId  (required)
 * @param transactionId  (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 extendInputPortTransactionTTLAsync(String portId, String transactionId, final ApiCallback<TransactionResultEntity> 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 = extendInputPortTransactionTTLCall(portId, transactionId, progressListener, progressRequestListener);
    Type localVarReturnType = new TypeToken<TransactionResultEntity>(){}.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}
 
Example #30
Source File: FunnelApi.java    From nifi-api-client-java with Apache License 2.0 5 votes vote down vote up
/**
 * Updates a funnel (asynchronously)
 * 
 * @param id The funnel id. (required)
 * @param body The funnel configuration 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 updateFunnelAsync(String id, FunnelEntity body, final ApiCallback<FunnelEntity> 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 = updateFunnelCall(id, body, progressListener, progressRequestListener);
    Type localVarReturnType = new TypeToken<FunnelEntity>(){}.getType();
    apiClient.executeAsync(call, localVarReturnType, callback);
    return call;
}